NAV Navbar
Phenix logo
Version 2020.0.22

FAQ

Why isn’t autoplay working?

Keywords: Browsers, Mobile, Desktop, Chrome, WebView, WebSDK

Problem: Browser policies on auto-playback may interfere with your desired autoplay experience.

Solution: First, make sure you properly configure the <video> tag so it can auto play in the browsers.

<video id="myVideoId" width="640" height="480" class="myVideoClass" playsinline autoplay></video>

Then please refer to autoMuted in the example integration in View a Channel. If the video was auto-muted, you need to show a user control so the user can manually unmute the media playback.

Browser polices about autoplay change periodically, please refer back to this question and to these reference materials from the various browser makers for details on their policies.

Why is playback blocked in battery saver mode?

Keywords: Mobile, Browsers, iOS, WebView, WebSDK

Problem: Mobile devices may operate in battery saver mode and thus restrict behavior related to playing audio and video. For example, the browser may refuse to auto play a video in low battery mode.

Solution: In order to facilitate media playback when battery saver is in effect, you may need the user to manually trigger play() on the <video> element to unlock it. This may not be achieved by displaying a button but require direct interaction with the <video> element on the screen. Please review the example code for integrating a renderer in View a Channel and Channel Viewer Example, which show the relevant events so your application can show user controls to start playback and/or unmute the playing video. In particular, failedToPlay with reason failed-to-play or reason paused-by-background.

Where can I find documentation of the text chat feature?

Keywords: Chat, Mobile, Browsers, WebSDK, Native SDK

Problem: I would like to add chat functionality to my application.

Solution: The Phenix SDKs provide the ability to integrate chat functionality:

You need a ChatService for your platform:

This does require that you have access to a RoomService:

For viewers

The joinChannel method will provide you with a RoomService object once it has successfully joined the channel. (Note: You need to hold on to that reference anyway in order to stay joined):

For publishers

The publishToChannel method will provide you with a RoomService object:

Observable Pattern

Like other room/channel objects, the ChatService is using observables to communicate changes. They behave somewhat like Rx observables and let you write more concise asynchronous code.

Please note for iOS only: All object names are prefixed with Phenix, e.g. PhenixChatService.

How do I deal with corporate firewalls?

Keywords: Network, Firewalls

Problem: I have clients in corporate networks and need to traverse the corporate firewall.

Solution: Please refer to the networking overview on what ports need to be whitelisted for streaming.

What size and bitrate should I use for publishing?

Keywords: Bitrate, Size, Resolution, Framerate, Publishing

Problem: What size and bitrate should I publish?

Solution: This depends on your use case. You can find the supported quality levels along with sizes in our API documentation.

In general, to reach most if not all mobile devices we recommend 480p@15fps for talking heads pictures (low motion). For other use cases, up to 1080p and 60fps might be applicable. Please contact our support to discuss the best option for your application.

What are the options for recording streams for video-on-demand (VOD) playback?

Keywords: Recording, VOD, HLS, DASH, mp4, ffmpeg

Problem: I’d like to record streams so they can be played back later.

Solution: Recording is built into our platform. We provide customers with a simple workflow for recording streams for subsequent VOD playback. This feature is invoked as a capability set up on the publisher: on-demand.

When recording with our on-demand capability, the platform provides a chunked HLS and DASH stream stored in perpetuity or until it is deleted by the customer. You can directly access the playlists by fetching the playlist URL from our API to integrate playback with your own player. Alternatively, you can use the same subscribing mechanism as for our real-time streams. In this case, you would need to know the stream id (which can be obtained from the ExpressPublisher object via a getter).

Additionally, you receive on-demand notifications if you have setup a notification callback.

You can also download your stream as a mp4 file using ffmpeg:

ffmpeg -i https://phenixrts.com/video/<applicationId>/<url-encoded-streamId>/vod.m3u8 -c copy my_stream.mp4