Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Modify the iframe code in order to reproduce a video with the highest definition by default


I have uploaded a video using JW Player. In my JW Player account, under the section "VIDEOS", I click on the "EMBED" blue rectangle, the one that has the "</>" symbols. A screen appears where I can view the "IFRAME" code:

<iframe src="//content.jwplatform.com/players/jIBnkxbm-A91pMc7u.html" width="480" height="270" frameborder="0" scrolling="auto" allowfullscreen></iframe>

I have copied this code to WordPress and the video loads fine.
There is a "HD" button that allows you to choose between different qualities.

Now, every time someone presses play, by default the video is reproduced with the lowest definition.
Pressing this "HD" button, I see that this default definition is "H.264 320 px". If you switch to the highest definition,
the "H.264 1920 px" option, the size of the screen is the same (which is good) and the resolution of the video is enhanced considerably.

Firstly, I would like to modify that code in order that anyone that plays the video,
this is reproduced with the maximum definition, the "H.264 1920 px" option.

Secondly, I would like to modify that code in order that anyone that plays the video,
this is reproduced automatically in "Full Screen Mode".

I would appreciate very much if you could help me to modify the upper "IFRAME" code
in order to achieve these two things.

Thank you very much in advance for your help,

David Carrasco

1 Community Answers

Alex

JW Player Support Agent  
0 rated :

Hi, David.

My name is Alex and I am one of the Support Engineers at JW Player. I will be more than happy to assist you with your questions.

When embedding content using the “Publish Mode” feature of your account dashboard, we are automatically embedding a HLS stream as the primary source. HLS is an adaptive format that will automatically adapt its quality based on the bandwidth available and the size of the player.

In order to begin playback as quickly as possible for your viewers, by default we begin the streaming with the lowest quality variant of your stream. Whenever that first segment of the stream has finished playing (around 10 seconds), the player will decide if it can increase the quality of the stream and do so, if possible. Then, if the connection gets worse during the stream, it can also decrease the quality of the stream. This is the major benefit of using an adaptive streaming format such as HLS – it adapts itself to all sorts of environments.

In most embedding scenarios, you can technically force the player to play a certain quality by using various methods found in our JavaScript API. However, we do not recommend doing so because manually setting a quality will cause the stream not to be able to adapt its quality based on various conditions. It also could cause a lot of issues for users on mobile devices, or lower quality connections. For example, if you force the player to stream the 1920px version of your content, someone viewing the player on a mobile device will be forced to download that version of the stream which will result in slow performance, a lot of buffering, and also a lot of wasted data usage on the viewer’s mobile contract.

With that being said, using the JavaScript API to do so when you are embedding the player using the iFrame code from the dashboard is impossible because the two pages would be on different domains. If they were on the same domain, using JavaScript on one page to make something happen on another page is technically possible, but it is a lot more involved than if you were embedding the player on the same page as your code.

As for your second question, can you elaborate on it? Are you asking if manually choosing the quality would still be applied if the player was in fullscreen? If that is the case, than yes it would. However, as I said before, it wouldn’t be possible to manually choose a quality when using an IFrame embed.

Please let me know if you need any more help or have any other questions.

Thank you!

This question has received the maximum number of answers.