I am trying to play back videos referenced by an external URL using the link module.
A lot of my videos are hosted by a provider that uses redirects when requesting video files. Here are some example enclosure URL's:
http://api.kickapps.com/rest/resource/VIDEO/1702801/30809?returnMP4=true
temporarily redirect (HTTP code 307) to
http://media2.kickapps.com/videos/1702801.mp4
I have no problem playing those back using the Video-JS, but the Drupal Modules seems to have a problem with the redirect.

Comments

Jorrit’s picture

Status: Active » Postponed (maintainer needs more info)

Can I see a webpage where Video.js fails because of this problem?

dietric@gmail.com’s picture

I don't have anything in a environment at this point that is publicly accessible.
It should be easy to reproduce though by pointing a link field to "http://api.kickapps.com/rest/resource/VIDEO/1702801/30809?returnMP4=true"

Jorrit’s picture

Before I do that, what version of Video.js are you using (I mean the library you get from Videojs.com) and what browser are you using?

dietric@gmail.com’s picture

Hi,
i am using Version 3.1.0 of VideoJS, and I have been using Google Chrome 17.0.963.78 m on Windows. I have also tested it with other browsers (Firefox, Safari) with the same results, I can provide version number if you think that would be helpful.
Thanks
Dietrich

Jorrit’s picture

There are two problems, none of them have to do with the redirect:

1) The module strips of the query string (?returnMP4=true), creating a URL that the player can't handle.
2) Because the link doesn't end in an extension, the module can't determine the mime type and defaults to video/webm (for historical reasons).

I am going to make two changes:

1) Fix the query string
2) Allow you to override the mime type using the title field
3) Set the default mime type to video/mp4 when using the link field, because that seems to be the most widely used one.

You can try these changes tomorrow, when the -dev release is refreshed.

dietric@gmail.com’s picture

Thanks so much for doing that! I noticed the changes are present in videojs 7.x-2.x-dev. However, I am using 6.x-2.0-rc3 - are you planning to update that too?
Thanks
Dietrich

Jorrit’s picture

I hadn't noticed that, fixed it there as well.

dietric@gmail.com’s picture

That seems to have fixed it for the URL I mentioned, but I still have a lot that seem to be returning different MIM/TYPES. I think that those don't even work with Video-JS outside Drupal, but I was curious if you ever encountered those before I dive any deeper into the actual Video JS library:
http://api.kickapps.com/rest/resource/VIDEO/905450/30809
http://api.kickapps.com/rest/resource/VIDEO/905476/30809
http://api.kickapps.com/rest/resource/VIDEO/905487/30809
Those return SMIL as the MIM type. SMIL files are used by some CDN networks as an additional layer to provide load balancing. The SMIL file contains the location information for the media file residing in one of the edge servers the CDN has.

Jorrit’s picture

The video.js library is just a wrapper on top of the HTML5 <video> element, which doesn't support smil. My suggestion is that you keep using ?returnMP4=true to get a URL to an actual video file.

Jorrit’s picture

Status: Postponed (maintainer needs more info) » Fixed

I am going to mark this issue as fixed. If there is anything else that I can do regarding this issue, please let me know.

dietric@gmail.com’s picture

Great, thanks for all the help! I am trying to get the video hosting provider to provide a non-SMIL.

Jorrit’s picture

I don't understand, why is the ?returnMP4=true method working?

dietric@gmail.com’s picture

It probably redirects to the MP4 version instead of returning a SMIL file. Unfortunately, it does not do on-thee-fly transcoding if necessary...;-(

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.