...
If you are using ChannelExpress (recommended), you can subscribe to sessionId changes when first obtaining the session ID, for example:
Code Block |
---|
channelExpress.getPCastExpress().getPCastObservablegetSessionIdObservable().subscribe(function (pcastsessionID) { if (!pcast) return; if (!pcast.getProtocol()) return; var sessionId = pcast.getProtocol().getSessionId() //check if null if(!sessionID) return // use sessionID to request streamToken here }, {initial: 'notify'}); |
If using PCastExpress API, use the getPcast method to get access to the low-level API and thus the sessionId: https://phenixrts.com/docs/android/#get-pcast
https://phenixrts.com/docs/ios/#get-pcast
https://phenixrts.com/docs/web/#get-pcast
...