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?
Related
I have a quite specific issue regarding Chrome's new feature where they stop autoplaying videos.
On our site we wanted the page to load as quickly as possible, so only insert a new Vimeo embed object when a user has chosen to click to watch a video. Eg. the showreel on our homepage:
https://www.splinter.co.uk/
The problem arises because we use our own custom play button, so Chrome doesn't recognise that as a user-interaction, so it doesn't think that the user has chosen to view the video, therefore it blocks the autoplay option (which works fine in Safari).
I wondered if anyone else has had this problem, and if anyone can think of a workaround?
Thanks!
On the VOD home page of Vimeo you can find a technique that is used for a case like this. https://vimeo.com/ondemand
You can preload the Vimeo player when the user hovers over your custom play button so that at the time they click the Vimeo player.js API can be used to initiate playback. player.play()
If that is not sufficient it might be needed to load the player on page load and just keep it hidden, on the button press reveal the player and use the API to initiate playback.
I am building a website where I want to display a video to my users, and make sure that the user can only watch it one time without any control over the video. I want to show the video to the user later after the user goes through some process, that second time the user should have control over the video. This means that:
Controls should be disabled (the user can't pause, rewind, forward, etc..)
It should not be possible to see the video again by refreshing the page
The user should not be able to download the video to watch it again.
The controls should be enabled again only after a sequence of steps are made by the user (e.g. clicking a button)
As for 1, I tried setting the controls attribute in html5's <video> element to false as shown here. But when you refer to an actual video the user can then be able to right click and show controls (e.g. https://jsfiddle.net/dySyv/136/).
I think I'll handle 2 using JS flags or backend sessions, as long as I can have access to event listeners (e.g. video.onended).
3 is not possible using html5, 4 is possible but I can't hide the controls in the first place..
How do I do that? or should I use a third-party library?
I have a set of php/html pages that contain buttons that when the mouse is over it plays a sound.
Now I want that when the user clicks on another button, it silence all pages of the site or put them with sound, depending if the sound was already on or not.
I already have an html code that allows me to silence the page, but it only work on the page itself, if I go to any other page or go back to that page they have sound. And I don't want that...
This is an exemple of the code in one of the pages:
<audio preload id="sombotao">
<source src="audio/somBotao.ogg"></source>
</audio>
<img src="img/exemple.png" onMouseOver="document.getElementById('sombotao').play()" />
I've tried using javascript, but it didn’t work.
I even tried with php using sessions, but since my experience is very limited it also didn’t work.
Can anyone help me? Where can I find a piece of code as an example?
Thanks in advance.
JV
This is completely possible. One solution will take a combination of server side and client side code. Your pages must have code that automatically checks the server every so often for updates to the volume level (This works similar to automatically updating comment feeds or stock tickers, but is so much simpler).
Your solution will look like this:
Step 1
Page 1:
Sound is playing
Page 2:
Sound is playing
Step 2
Page 1:
User clicks the mute button.
Page 1 "posts" via ajax to volumecontrol.php
Step 3
Page 1:
Query volumecontrol.php and find page is muted, continue muting
Page 2:
Query volumecontrol.php and find page is muted, change current volume to "mute"
A little more explanation
Think of this like a whiteboard at a doorway. As people enter and leave the room, they leave instructions for the other members. Members do not have to be present when a message is written, they only have to see the board every so often to coordinate with the other members of the group.
One important part of this whole process is that you will set the volume according to something unique to the user (i.e. a session variable).
Another key is that you use Ajax to push settings to a page in PHP and use Ajax to regularly check the server for updates to that setting.
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 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.