React-player: Select Bitrates Manually

Created on 26 Nov 2018  路  1Comment  路  Source: cookpete/react-player

Hello Pete,
My client asked me to add bitrate selector to the player. I need to know,
how can I change bitrates manually? as far as I know, React-Player change
bitrates based on bandwidth speed.

Most helpful comment

if you're using an HLS stream, once the player has loaded (onLoad event), you can use the getInternalPlayer('hls') method to get the hlsPlayer instance. Then you can access all the available levels (streams) from hlsPlayer.levels, and you can manually set the level with hlsPlayer.currentLevel = ... or hlsPlayer.nextLevel = ...

https://github.com/video-dev/hls.js/blob/master/docs/API.md#quality-switch-control-api

>All comments

if you're using an HLS stream, once the player has loaded (onLoad event), you can use the getInternalPlayer('hls') method to get the hlsPlayer instance. Then you can access all the available levels (streams) from hlsPlayer.levels, and you can manually set the level with hlsPlayer.currentLevel = ... or hlsPlayer.nextLevel = ...

https://github.com/video-dev/hls.js/blob/master/docs/API.md#quality-switch-control-api

Was this page helpful?
0 / 5 - 0 ratings

Related issues

samuelbriole picture samuelbriole  路  5Comments

rpaschoal picture rpaschoal  路  5Comments

Betree picture Betree  路  4Comments

MarcLopezAvila picture MarcLopezAvila  路  5Comments

MDrooker picture MDrooker  路  6Comments