2

I'm using JW Player to display videos. My videos are uploaded directly onto JW Player server and it returns a video key for each one through BOTR API (Bits on the Run) that belongs to JW service.

Here is how I display a video with video key

<iframe src="http://content.bitsontherun.com/players/myvideokey.js">

That way video will NOT be responsive although I tried many ways (designers.hubspot.com/docs/snippets/responsive/how-to-make-a-youtube-or-other-iframe-video-responsive).

Then I follow jw player instruction: http://www.jwplayer.com/blog/new-in-jw-player-responsive-design/ and it works like a charm but not all keys.

<script type="text/javascript">
jwplayer("container").setup({
  file: "http://content.jwplatform.com/videos/myvideokey.mp4",
  width: "100%",
  aspectratio: "16:9",
  autostart: true,
  repeat: true

});
</script>

My problem is that: Some of my video keys work but not others. That means some keys only work with iframe way but in the second way it shows this error "Video cannot be played" (it does not show "video not found").

All my video keys are in only one BOTR API account.

dhminh
  • 31
  • 6
  • 1
    Can you provide a link? – emaxsaun Nov 21 '14 at 15:58
  • Here is the link it works http://content.jwplatform.com/videos/ayi3IrMy.mp4 and these will not work: http://content.jwplatform.com/videos/65QhtkiS.mp4 – dhminh Nov 24 '14 at 03:18
  • Please see my demo: http://jsfiddle.net/dakiquang/aoLap2ct/ – dhminh Nov 24 '14 at 03:31
  • 1
    This works for me, and it is responsive. – emaxsaun Nov 24 '14 at 03:57
  • Yes but almost keys never work in the demo: nXZkEJgu eAn7xGUg 5W7IiOB5 ... My video keys are correct because it works when I apply it in iframe way (mentioned above) but not responsive. – dhminh Nov 24 '14 at 04:43
  • 1
    Ok, do you have a demo where it is not working then? That is really what I wanted to see. – emaxsaun Nov 24 '14 at 23:25
  • Thanks for your reply. Here it is: http://jsfiddle.net/aoLap2ct/5/ – dhminh Nov 25 '14 at 02:05
  • 1
    It looks like some of the videos on this JW Platform account have expiring URLs set. The first video you provided doesn't have an expiring URL, which is why it is still valid, the other one has an expiration, which is why it fails. – emaxsaun Nov 25 '14 at 07:37
  • 1
    Actually, looking into this further, one of the accounts has expiring urls set, one doesn't. Are these your accounts? These are two separate accounts. These are sub accounts of a master group account. Do you own these accounts? – emaxsaun Nov 25 '14 at 07:39

1 Answers1

1

Great thanks to Ethan JWplayer and Andrew. I finally find out a way to solve the problem.

In setting page of my JWplayer reseller accounts, "secure embed and download video" option is selected. That's why I cannot access these videos by that way. I need to add signature and expiring time right after file url to make it work.

Here is an example: http://dashboard.jwplatform.com/videos/nPripu9l.mp4?exp=1271760610&sig=b59b91370f4faf4815b6736db10e5041

This article will solve the problem:

http://support.jwplayer.com/customer/portal/articles/1433647-token-signing-with-jw-platform

dhminh
  • 31
  • 6