I am looking to have a video start when a page loads, but once the video has completed, to hide the video (remove the layer possibly). I saw it on a yoga site a few years ago where a video message from the owner appeared over top the content when the page loaded but then dissapeared after the video was done. Not even sure where to begin looking for something like this.
This is something that needs to be handled at the player level. Many flash players or frameworks allow you to register for an event. One event might be on video complete. First get this working. You may not be able to do this from javascript. For example, adobe's strobe player requires you to write a swf plugin which would be loaded in the flash player. Not trivial.
After you have registered it, you can easily close the window by executing some javascript function.
Let me know if you have more questions.
Related
I'm aware this question exists, please don't mark this one as a duplicate as things have changed since it was originally posted.
I am looking to embed what's called a "secret" (aka private) Facebook video onto a sales page to serve as a video sales letter. The video needs to play automatically (for as many devices as possible, anyways) and needs to have all video control options removed.
Basically it's click to play, click to pause, and if they know to use the arrows to FF or rewind, then, so be it. But that'll be less than 1% I'm assuming.
In the old solution the person mentioned Facebook having the option data-controls="false".
When trying to use this parameter now the entire video locks up and suggests the user to reload the browser.
Is there a way I can get around this? I'm thinking building out a custom player and seeing if I can set the FB video as the source, but even then it seems like there will be a page name and share option overlay on the video.
Any ideas?
I am building a site for someone who wants to have a sound cloud player on his site, but wants it skinned up to look integrated into the site. For the moment, I am using a script which will create an iframe element within a hidden div (which auto plays), and when a new item is selected to play, it clears the div, and replaces it with a new iframe element.
The next phase for the project requires a bit more integration though. I have been searching for javascript sound cloud integration, but all it seems to provide is creating a simple link that will play and pause the track (only on the users request) with a little bit of javascript to coax it into playing immediately.
Are there any other integrations for sound cloud via javascript that would allow for playing, pausing, stopping and getting information about the current play position (like from an event), as well as other events (like onstart, onstop, onpositionchange, etc)?
Ah ha, found the answer. Have a look on: http://developers.soundcloud.com/docs/api/sdks#javascript
The SC.stream seems to provide all the answers
I'm working on a project where a SWF will play (as sort of a splash), followed by JS. After the video plays, the navigation and content will appear, and the video will fade out. I'm just wondering what would be the best way to accomplish this? Play the video first and then load everything via ajax behind the scenes? The goal is to be as seamless as possible and I am having a flash asset provided to me by the client. I have zero experience with flash outside of simply embedding.
The Flash asset can call a JavaScript method via ExternalInterface when it's done.
However, the use of Flash for splash screens is something generally hated by users. I would recommend against it unless it's an intro they specifically click a "Show Intro" button to show (as opposed to always showing with a Skip Intro to skip).
I have a video playing on my page. I want to show and hide some div's when the video reaches a certain point. Lets say hide something on 10th second and show it again on 20th second.
I can easily do it in HTML5 with video tag and currentTime attribute but for IE I have to create the same functionality and I think with flash based videos (from YouTube or something like that).
Is there a way to detect the current time of a video playing on my website, embeded from YouTube, Metacafe or any other video sharing site?
I know I could detect it in flash and make it run some JavaScript function but I don't have flash nor have the skills to do it in AS3.
Is it possible to do it from JavaScript level or does any video sharing website out there provides this kind of functionality for their videos?
You could look into using flowplayer, it exposes events for meta data and timing.
You can use ExternalInterface to communicate between flash and js. So inside the flash app, when the video reaches the defined time, you can trigger a call to js function, doing whatever you need with the divs.
Since you will need to receive a stream and you need to detect a specific point in the video I thing you have read this inside flash.
I am currently coding a website for a band and i have a music player located within a frame in the website. I would like to make the music player pop out from within the page when i click on a button.
I was wondering if there was some sort of javascript/jquery code i can employ for this function. If not, what other work-around can i use to achieve this.
If possible, as part of the function, i would like the frame to close from the window after it has popped out, and the other frame to load up as a complete website.
If you must... ;)
http://javascript.internet.com/generators/popup-window.html
You can call javascript window.open() function from your flash music player with ExternalInterface.call() (and make sure you've set allowScriptAccess=samedomain as flash param in html for it to work).
Then open your music player swf in a popup with some additional parameter attached, so you know that it lives in popup window.
To make the popup version continue playing where framed one was at, you can use a LocalConnection call. The framed version would listen for LocalConnection, and expose its current play state (what is playing, at what second etc) and popped up version could ask for this and continue exactly from the same place. This will make the popping up experience much smoother for end user.
Finally the framed player can call additional javascript functions via ExternalInterface.call() to remove itself from framed document's DOM.