Firefox not playing embedded swf - html

I am using swfin to embed a swf object (video player) and it loads fine in all browsers, but in firefox it won't "start". I have to right click on the movie area and "start" is unchecked so I click on "start" and it will start just fine. Yet, in chrome and IE (haven't moved to a mac for testing yet) it fires up and starts just as I expected. I have tried swfobject instead of swfin and I have IE issues that I couldn't seem to correct. Hence moving to swfin. I saw a similiar problem like this using swfobject but I can't get it to replicate anymore.
Here is the swfin code:
`
var s = new swfIN("/Flash/video_player_playhead_overlays.swf", "flashMovie", "427", "280");
// s.hideSEO("div_seo");
s.addVar("video_file", "/DownloadableWork/Boardwalk.flv");
s.addVar("poster_file", "/Images/UploadedImages/Boardwalk.jpg");
s.addVar("clock_display", "yes");
s.addVar("playbtn_scale", "1");
s.addParam("play", "true");
s.addParam("loop", "true");
s.addParam("quality", "high");
s.addParam("scale", "showall");
s.addParam("wmode", "transparent");
s.addParam("menu", "true");
s.addParam("allowScriptAccess", "sameDomain");
s.write();
</script>
`

It's probably related to the video player swf itself rather than the http browser.
I would strongly recommend using swfobject, it's widely accepted as the industry standard for embedding swf content.
http://blog.deconcept.com/swfobject/
SWFObject is also recommended by Adobe.
http://www.adobe.com/devnet/flashplayer/articles/swfobject.html

Related

HTML5 Without Https

I would like to have a file (ex. index.html) where i can use html5 for video.
I would like to access this file from my webbrowser locally. Without the need of a website.
I have tried using this on my pc locally, but it would not execute the html5.
I then have pushed it to my website which does have https:// and the videoplayer worked the way it was supposed to.
<video id="videoPlayer" src="a.mp3" autoplay autobuffer controls />
<script type="text/javascript">
var nextVideo = "b.mp3";
var videoPlayer = document.getElementById('videoPlayer');
videoPlayer.onended = function(){
videoPlayer.src = nextVideo;
}
</script>
This code will not have the html5 functions available.
I tried using this code with the chrome plugin pitch shifter without succes (local) while on my server it would work perfectly
I'd comment instead of answering but i am not allowed to.
The problem you encounter is not reproduceable in Chrome Version 61.0.3163.100 on Windows 10 - 64 bit. IE, edge, FF and chrome work with your code (but 2 mp4 files instead of your mp3's) locally for me.
What does the Console output of the F12 debug tools write when you attempt to load it locally?

Audio Tag Autoplay Not working in mobile

i am using this code and when i see the controls i see the autoplay is not working.
<audio autoplay="true" src="music/lathe_di_chadar.mp3" type="audio/mp3" loop></audio>
and its not working in the mobile devices and very well working in website.
Can anyone tell me the problem in this?.
Thanks and well Appreciated
Now, it's2020
Note that (for the below reason?) Chrome has changed their autoplay policy (see https://developers.google.com/web/updates/2017/09/autoplay-policy-changes ) so you now must either:
resume() the audio context after some (any) user interaction with the page
or be "highly ranked" (ie trust Chrome not to stop audio by default based on user's and world's behavior)
or (as far as I get it) user must be on origin A then click a link to same origin A and that new page of A can autoplay things.
You can play a sound using the AudioContext API and taking the source from any ArrayBuffer (ie: from a XMLHttpRequestor a File)
window.addEventListener('load', function () {
var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
var source = audioCtx.createBufferSource();
var xhr = new XMLHttpRequest();
xhr.open('GET', 'audio-autoplay.wav');
xhr.responseType = 'arraybuffer';
xhr.addEventListener('load', function (r) {
audioCtx.decodeAudioData(
xhr.response,
function (buffer) {
source.buffer = buffer;
source.connect(audioCtx.destination);
source.loop = false;
});
source.start(0);
});
xhr.send();
});
Live example
Works on Chrome and Firefox both mobile and Desktop
Important notes
It's worth mentioning, IMO, that this "trick" can actually be considered as a browser bug, and might no longer work at any time if browser decide that this breaks user experience/becomes a widely-used annoyance (like ads).
It's also worth mentioning that, at least on my mobile and FF 54, the sound will still be played, even if your mobile is muted...
It's also also worth mentionning that user might set the autoplay behavior to fit their wishes and needs either through the browser's usual options or through the more-advanced about:config page (autoplay behavior is set by Firefox's media.autoplay.enabled and media.block-autoplay-until-in-foreground preferences).
So forcing the audio autoplay is a bad UX idea no matter how you do it.
There is no way to get autoplay working in mobile browsers. (This is not allowed)
But some tricks do this thing.
Click on the links below to view some tricks
Autoplay audio on mobile safari
iOS-Specific Considerations | Loop Attribute
I have a lot of experience with this problem. It also applies to Javascript audio that loads before the user has had a chance to interact with the page.
HOWEVER, once a user clicks absolutely anything, it's game on. I personally recommend a full-page entrance overlay right on the front page: "Click to enter my awesome site!" If the user enters the page at all, they are doomed to hear whatever sounds you want to throw at them! :D
I think this method work today both FF & Chrome. This seams as best solution from #Xenos mention above.

Youtube iframe embed looping working in every browser except IE9 & IE10

Here's my HTML...
<iframe width="1425" height="613" src="http://www.youtube.com/embed/IHJ-djBr0Q0?autoplay=1&controls=0&loop=1&wmode=transparent&modestbranding=1&showinfo=0&playlist=IHJ-djBr0Q0" frameborder="0"></iframe>
This autoplays and loops fine on every browser except IE9/10. It works in IE8 cuz it uses the flash player. I'm not sure why IE11 works and 9/10 don't though. Ideas?
Note: it DOES work if you have flash installed i believe, but I would prefer they use the HTML5 player.
I ran into this same issue and after extensive testing and Googling, I couldn't find a reason. I then tried a number of ways to get it to work, and I found that removing and reinserting the iframe into the DOM (and also re-registering the Player) worked.
Here's a codepen for it http://codepen.io/toddzebert/pen/XbYjdq
Note the var console = function at the top is only to provide IE9/10 commentary since those browsers don't like console.log in iframes (such as codepen's).

VideoJS Flash Fallback Not Working When Dynamically Changing Source

I'm having issues with my videos not being played back in firefox. I'm attempting to dynamically update one video element's source to play multiple videos without re-creating the element every time my function is called.
E.g., first click makes the video source = video1.mp4, next click maintains that video player, but changes the source = video2.mp4 without recreating the element.
My reason for doing this is to only have to use one filetype for all browsers. I realize I could just make another source tag under the video element and give it a MIME type of video/ogg and it would work with HTML5 in firefox, but I want to have a universal format to take the burden off my users.
I can get this to work perfectly fine in chrome, but when changing to firefox the flash player only plays the first video source then
for some reason becomes undefined.
Firstly, I created a video element inside a lightbox. The lightbox is opened through a function which is called onclick of an anchor tag. When the lightbox is opened, I initialize a videojs player of the video, then set its source to the URL passed into the function. I then load the player, and play it. This works perfectly fine in chrome with HTML5, but in firefox the flash fallback works once then breaks.
I was reading about the problem and thought my problem might be the fact that flash converts the video element into a flash object, then when I try to reference the video with the same ID again, it isn't found because it doesn't exist as a video element anymore.
Here is a code sample: http://jsfiddle.net/7WTrh/12/
I tested in chrome, and it works, but firefox does not.
Thanks for the help in advance.
When you're changing the source, you need to make sure you're passing the mime type as well, so video.js knows what tech it needs.
myPlayer.src({ src: "vid.mp4", type: "video/mp4" });

Stop audio buffering in the <audio> tag

I am currently working in using the HTML5 audio player to provide a audio stream (24/7 radio stream) via the (mobile) browser. Loading in the stream and playing it works fine.
The major problem is that the HTML5 <audio> tag will keep downloading (buffering) content even when its not active. This could be a major issue for mobile users since most of them pay for data use. So far I have not been able to find a decent solutions that works cross browser to prevent this.
I tried so far:
Unload the source when pause is pressed. < This does not work cross browser
Remove the audio player element and load a new one. This works but
lets be honest, this is a very hacky way of performing an extremely
simple task.
I was simply wondering if there is something I'm overlooking in this whole issue since I am convinced I'm not the only one with this issue.
The <audio> element includes a preload attribute. This can be set to "none" or "metadata" which should prevent the audio preloading.
Source: https://developer.mozilla.org/en/docs/Web/HTML/Element/audio
I found a workable solution for the problem described above. A detail description can be found here: https://stackoverflow.com/a/13302599/1580615
You can do the following to stop buffering load without errors:
var blob = new Blob([], {type: "audio/mp3"});
var url = URL.createObjectURL(blob);
audio.src = _url;
or, shortened up:
audio.src = URL.createObjectURL(new Blob([], {type:"audio/mp3"});
Now you're not loading a "" which is a bad url for the audio tag to try and load. You're instead loading an actual url made from a Blob that just contains no data for the audio to playback.