How can I get video.js to play in Firefox? - firefox

I've (with help) added the video.js player to a web page and it plays well in all browsers except Firefox. When accessing via Firefox, and trying to play a video I see: "no video with supported format and MIME type found".
Here's my player code:
<object class="vjs-flash-fallback" width="640" height="264" type="application/x- shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
<param name="movie" value="http://url.com/flowplayer/flowplayer-3.2.16.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"playlist":["[var.base_url]/[var.thumb_file]", {"url": "http://url.com/uploads/ [var.video_play]","autoPlay":false,"autoBuffering":true}]}' />
<!-- Image Fallback. Typically the same as the poster image. -->
<img src="[var.base_url]/[var.thumb_file]" width="640" height="264" alt="Poster Image" title="No video playback capabilities." />
</object>
</video>
Any suggestions/ideas/remedies will be appreciated.

Try changing your code to:
<video id="myMovie" class="video-js vjs-default-skin" controls preload="auto" width="640" height="264">
<source src="/path/mymovie.mp4" type='video/mp4' />
<source src="/path/mymovie.webm" type='video/webm' />
</video>
video.js should handle all the necessary fallback nonsense that made embedding videos such a headache back in the day.

Related

How to play a video from storage in laravel

I uploaded a video file in the storage folder and stored the path in database.
I want to play the video on the blade but it is not working
video.blade.php
<video controls>
<source src="{{asset('storage/'. \App\Video::where('vid_id', $vid_id)->value('vid_path'))}}" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
Path to the video
http://127.0.0.1:8000/storage/videos/2022_06_19_HmhR5cXugaEfvWe315Vi.mp4
The file uploads successfully but it does not play
You need to use the public path for the video asset. What I'd suggest:
Check if you can access the video directly from the URL that you mentioned.
In your code snippet, remove
<source src="movie.ogg" type="video/ogg">unless you have a movie.ogg resource of that format
Use url(), or public_path(), or asset() helpers to assign the src
something like this:
<video width="320" height="240" controls>
<source src="{{asset('path-to-your-video')}}" type="video/mp4">
</video>

HLS stream not playing with Videojs on Mobile Firefox

I have a problem playing HLS (m3u8).
I have a System with some Live streams. To play these streams I wrote a Webpage using Videojs.
This runs smoothly on Desktop with Chrome, Firefox and even Edge.
But with Mobile the Firefox wont play it anymore.
The Firefox Browser gets the playlist, shows the first frame and gets stuck. It then shows the following error:
A network error caused the media download to fail partway.
the code Iam using looks like this
<div>
<video
id="my-video"
class="video-js vjs-big-play-centered"
controls
<?php if(isset($_GET["autoplay"])) echo "autoplay"; ?>
preload="auto"
width="1920"
height="1080"
poster="pic/Video_Hintergrund.png"
data-setup='{"fluid": true}'
onplay="onVideoStartPlaying();"
onpause="onVideoStopPlaying();"
>
<source src="[...]/index.m3u8" type="application/x-mpegURL" />
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a
web browser that
<a href="https://videojs.com/html5-video-support/" target="_blank"
>supports HTML5 video</a
>
</p>
</video>
</div>
The Webpage and the Stream are located on the same Server.
Does anyone have some tips what I can try?

picture element does not work in angular2 and firefox

I have a "logo" component which essentially writes out a picture element. The template look like this:
<picture class="logo">
<source srcset="{{srcsetMobile}}" media="(max-width: 767px)">
<source srcset="{{srcsetDesktop}}" media="(min-width: 768px)">
<img class="logo" title="{{title}}" alt="{{alt}}" src="{{fallbackSrc}}"
</picture>
In angular2 this produces
<picture _ngcontent-lox-3="" class="logo">
<source _ngcontent-lox-3="" media="(max-width: 767px)" ng-reflect-srcset="/assets/img/Logo-mobile.png" srcset="/assets/img/Logo-mobile.png"></source>
<source _ngcontent-lox-3="" media="(min-width: 768px)" ng-reflect-srcset="/assets/img/Logo.png" srcset="/assets/img/Logo.png"></source>
<img _ngcontent-lox-3="" class="logo" ng-reflect-title="title" title="title" ng-reflect-alt="alt text" alt="alt text" ng-reflect-src="/assets/img/Logo-mobile.png" src="/assets/img/Logo-mobile.png">
</picture>
In Chrome this works great but in Firefox only the mobile image loads. The tag loads fine outside of Angular. When I use a web inspector and remove the angular attributes everything works fine so I'm thinking its a browser bug but I thought I'd post here to see if others had the issue or if someone has a workaround.
For me this does not work properly on Firefox. In the inspector I can see the DOM is correct but the images won't load properly. Only the last source is being rendered no matter the screen size.
Chrome and Safari do work without any issues.
I have the following HTML inside an Angular 2+ component.
<picture class="view-header__logo-picture">
<source
media="(max-width: 1040px)"
srcset="images/logo-32x32.png, images/logo-64x64.png 2x"
/>
<source
media="(min-width: 1041px)"
srcset="images/logo-72h.png, images/logo-144h.png 2x"
/>
<img class="view-header__logo-image"
src="images/logo-72h.png"
alt="{{ 'general.company-title' | translate }}"
/>
</picture>

Internet Explorer 11 Live Tile Caching and Expirations

I am creating a Live Tile through a pinned site with IE 11 on Windows 8.1. I'm using meta tags to achieve this:
<meta name="application-name" content="..." />
<meta name="msapplication-TileColor" content=" #768591" />
<meta name="msapplication-square70x70logo" content="..." />
<meta name="msapplication-square150x150logo" content="..." />
<meta name="msapplication-wide310x150logo" content="..." />
<meta name="msapplication-square310x310logo" content="..." />
<meta name="msapplication-notification" content="frequency=30; polling-uri=...;id=1;cycle=1;" />
(the ellipsis is where my urls are going)
My live tiles are working and receiving updates through my uri that I include in the polling-uri field. However, windows is caching those notifications every 30 minutes and replaying the static update on the live tile. This is really annoying since the live tile is set to display the status of my web app... Old information is confusing and irrelevant. Is there an xml field I can specify so windows doesn't cache old notifications?
This is what my xml currently looks like:
<?xml version="1.0" encoding="utf-8"?>
<tile>
<visual lang="en-US" version="2">
<binding template="TileSquare150x150PeekImageAndText02" fallback="TileSquarePeekImageAndText02">
<image id="1" src="..." />
<text id="1">ONLINE</text>
<text id="2">1:07 PM</text>
</binding>
<binding template="TileWide310x150SmallImageAndText02" fallback="TileWideSmallImageAndText02">
<image id="1" src="..." />
<text id="1">...</text>
<text id="2">ONLINE</text>
<text id="3">Checked at 1:07 PM</text>
</binding>
<binding template="TileSquare310x310SmallImageAndText01">
<image id="1" src="..." />
<text id="1">...</text>
<text id="2">ONLINE</text>
<text id="3">Checked at 1:07 PM</text>
</binding>
</visual>
</tile>
Thanks for your help!
Also, if anyone was wondering where the cached information is stored, it's located in C:\Users\username\AppData\Local\Microsoft\Windows\Notifications\appdb.dat
Unfortunately, you can't just delete this file or remove the cached information because that file is always open by explorer.exe (since it's constantly writing cache information into it). Also the group policy for deleting history on logout won't work for this since the computer will always be logged in.

mp4 player is not working in FF while using load-balancing

I am using load-balancing in my application hosted in ColdFusion 9 application server and am trying to play an mp4 video. I am displaying the video directly in the browser by clicking an anchor tag. Its working fine in IE, but does not work in Firefox. Firefox displays some junk characters like squares and question marks. There is no video or error message. However, when I run the same application without load-balancing its working fine in FF. Is the issue is due to the load balancing or do I need to set a MIME type?
Note: I am using FF 23.0
I tried with HTML 5 tag with flash fallback support. The code is `
<source src="https://#CGI.SERVER_NAME#/video.mp4" type="video/mp4">
<source src="https://#CGI.SERVER_NAME#/video.webm" type="video/webm">
<!--- Flash player code to play video in HTML5 non support browser --->
<object type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" width="1000" height="600">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
<param name="allowFullScreen" value="true">
<param name="wmode" value="transparent">
<param name="flashVars" value="config={'playlist':[{'url':'https://#CGI.SERVER_NAME#/video.mp4','autoPlay':true}]}">
</object>
</video>`
Also I added MIME types in httpd.conf file of Apache server. The MIME types are,
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
Now its working fine.

Resources