I am having trouble to make jwplayer work with different bitrates.
For each video, I am creating new output files with different suffixes that have lower bitrates: For instance, Output 1 (high bitrate): test-original.mp4 Output 2 (medium bitrate): test-medium.mp4 Output 2 (low bitrate): test-low.mp4
The output file names are dynamic as the users can upload as many different video files as they want.
jwplayer configuration:
jwplayer('video-container').setup({
'sources':[
{'file': "rtmps://" + server + "/mp4:" + media + "-original.mp4?t=" + t}
],
startparam: "start",
'autostart':false,
'controlbar':'bottom',
'viral.onpause':false,
'viral.oncomplete':false,
'viral.allowmenu':false,
'width':'470',
'height':'320',
'abouttext':''
});
My question is how should I change this so that automatically jwplayer plays the video with the appropriate bitrate depending on the user's bandwith.
As I cannot test this (only in production) , would this change suffice or what is required?:
jwplayer('video-container').setup({
'sources':[
{'file': rtmps + "://" + server + "mp4:" + media + "-original.mp4?t=" + t},
{'file': rtmps + "://" + server + "mp4:" + media + "-medium.mp4?t=" + t},
{'file': rtmps + "://" + server + "mp4:" + media + "-low.mp4?t=" + t}
],
startparam: "start",
'autostart':false,
'controlbar':'bottom',
'viral.onpause':false,
'viral.oncomplete':false,
'viral.allowmenu':false,
'width':'470',
'height':'320',
'abouttext':''
});
I am using the latest version of jwplayer. Any help will be appreciated.