Changing useragent in request headers for HTML5/FLASH HLS player? - user-agent

I have a site where I host live streams, and now our programmers restricted m3u8 files to be played only with specific user-agent otherwise it return 403 error.
We tried using GrindPlayer, but their support told us they do not support custom user agent.
Do you guys know any HLS HTML5 or FLASH player which support useragent to be set while requesting m3u8 file.
We are forced to use VLC webapp, and Chrome users can't watch videos.
This is major issue to us.
EDIT:
I just figured out this code
<video width="352" height="198" controls>
<source src="playlist.m3u8" type="application/x-mpegURL">
</video>
Works great in Android, Egde, IE etc, but not in Chrome.
Why Google Chrome makes everything so difficult?

Related

is there any way to play the video in safari browser

below are 2 video files uploaded in aws. it will play in chrome or firefox etc, but wont play in safari
https://s3.ap-south-1.amazonaws.com/apppreprod/Vid_637768063547139404.webm
https://s3.ap-south-1.amazonaws.com/apppreprod/Vid_637745132425435217.mp4
The issue is that safari wont play videos uploaded into blob storage like aws.
recomended solution is to save the video in other server and it will play in safari.
The two links you provide can be opened in other browsers. I tested it with an iPhone, and found that it could not be opened in the safari browser, but the other three-party iPhone browsers can. After checking the Apple official website, it is certain that the safari browser of the iPhone supports the MOV video format.
suggestion:
When uploading a video, the video can be converted and stored as needed

How to play uploaded videos in an iframe on a Mac system

I have tried using iframe and also video tag and object tag to play the video. In some cases, it plays only the audio from the video, but video doesn't show up.
Secondly, the same video file plays well on a separate tab in the browser, but not within my iframe.
This issue is on all browsers on my Mac, but on a windows machine it plays well.
I finally found it. Apple has a good documentation of its own for this. https://developer.apple.com/library/mac/documentation/quicktime/conceptual/qtscripting_html/QTScripting_HTML_Document/ScriptingHTML.html#//apple_ref/doc/uid/TP40001525-2-GettingaBrowsertoLoadQuickTime
I simply had to use the embed tag properly as they have explained.

Can't play video on FireFox and IE

I tried searching for a solution to this and within three days of browsing the forum I could't find any help.
This is the link where I have my video:
http://www.aguacatesjbr.com/English/Company/company.html
I believe the code is correct because I replaced my source video with the Oceans-Clip video provided by the site. The Oceas-Clip video CAN PLAY on FireFox and IE but not my original video. However, if I type in directly the address of my video it DOES render on FF and IE.
I donĀ“t think it is size problem because I was testing it with a video that weights 4.20MB.
I am having this problem with IE and FireFox in both PC and MAC. Android and Apple devices work perfectly as well with Chrome and Safari.
First of all, you need to serve the videos with the correct mime type, which is video/mp4 for H.264 in mp4, and video/webm for WEBM. See MSDN, MDN.
Right now you serve the .mp4video as video/mpeg.
Then, I your page has a source for video/webm pointing to http://www.aguacatesjbr.com/Videos/JBR_video.webm, which does not exist at the time of writing. Fix that.
Firefox can play back H.264/mp4 on certain platforms only. For a list of currently supported platforms and video support in Firefox in general see "Supported media formats".
Lastly, there will be warning messages regarding video load failures in newer Firefox versions. E.g.:
[20:35:11.515] HTTP "Content-Type" of "video/mpeg" is not supported. Load of media resource http://www.aguacatesjbr.com/Videos/JBR_video.mp4 failed. # http://www.aguacatesjbr.com/English/Company/company.html
[20:35:11.515] All candidate resources failed to load. Media load paused. # http://www.aguacatesjbr.com/English/Company/company.html

safari mac wont stream HTML5 video

I am having a very frustrating issue with HTMl5 video and safari/mac.
I am using html5 video throughout the site where needed and it works/plays on every browsers bar safari on a mac (its fine on safari windows and chrome mac for example)
The videos dont stream and only play once the entire file is downloaded. At first I thought it may be to do with the index of the file being at the end and not the beginning (link html5 video = safari wants to download it all) so i tried qtindexswapper but when loading the MP4 into the program it said the MOOV/Index was in the correct position.
Anyone have any idea why safari mac has this issue?
A.
I've seen HTML5 be very picky with videos. They may play fine in a player, but not play or maybe play with no audio once embedded. This is usually due to a video not properly created/formatted. In most cases, re-creating the file in a professional level program alleviates the issue.

video will play in firefox but not when in html5 video tag?

so we're building a video site with a html5 player (and backup flash for windows).
But what's really stumping me is when i view this file in firefox it plays;
http://www.roguefilms.com.local/media/uploads/2010/07/1495/8_lg-poke.mov (stored locally) but when its in the html video tag is does nothing. It shows the poster but doesn't play the video. It doesn't even show the 'Sorry - your browser is not supported!'
I know ff prefers ogg and we can use the flash backup player but if it can play it as a ht64 .mov without the player why can't it with? Seems a bit daft?
If anyone knows anything it would be great...
<video controls="controls"
id="myVideo"
src="/media/uploads/2010/07/1495/8_lg-poke.mov"
poster="/media/uploads/2010/07/1495/still.jpg"
height="360"
width="640">
Sorry - your browser is not supported!
</video>
best, Dan.
When you just load the .mov file, the content-type your server provides causes Firefox to check and see and see if any plugins handle the content. In this case, QuickTime handles it, which is why it plays.
The video tag doesn't launch plugins to play content, however.
Firefox doesn't support h264, as you mentioned, although am surprised it plays the video in its own, unless its forcing it into a Flash player automatically, which is possible.
To get the "sorry" message to display you'll need to use the source element:
<video controls="controls" id="myVideo" poster="/media/uploads/2010/07/1495/still.jpg" height="360" width="640">
<source src="/media/uploads/2010/07/1495/8_lg-poke.mov">
Sorry - your browser is not supported!
</video>
I wrote this back in April of last year, but it might help: html5laboratory - using the video element.
We once had a similar issue with the web server (Apache, in our case) not sending the proper MIME-type for the video file and Firefox first downloaded it completely before starting to play it. Is it possible that the player would work if you just waited long enough? You could use Firebug to see if your browser transfers anything.

Resources