i am searching a way to check if user has watched the entire video on iOS device. I have tried 2-3 html5 video frameworks. Now i make tests with Popcorn.js.
I want the user watches the entire video and not skip to the end. I have tried every possible way i could think but nothing works on iOS. I tried the seeked method but it's not be triggered if an iOS user seeks back-and-forth.
In desktop everything works great of-course...
Related
I am developing a website where the landing page shows a video of waves at the beach. The customer then wanted me to implement audio in connection with that screen (some sea sounds).
On my way home listening to music, I checked the site from my mobile device. Everything worked great, but the music I was listening to (from Spotify, but I guess it's the same behaviour with other music apps), stopped.
I consulted Google, but didn't find a solution. Is there a way to prevent that?
Your music was playing by an app in your mobile . But when you open mobile browser , and then go to the website which has a video and sound on the front page . The browser tried to run the video with music . That's why your background app , which was playing music got interrupted as browser was also trying to handle the same audio api .
The same thing happen to me on my android mobile . But the recent chrome update has fixed the issue . But mozila and other browsers are not enabling the background music till.
I have no idea about iphone .
It makes complete sense. I don't know why you would want two sounds to be playing at the same time. That would be noise I guess. I think you don't have a problem, in fact it is best the website audio pauses other audio instances on your device.
I have checked in my iPhone with this website which has audio in it.
https://guccidive.gucci.com/
And also played song in Spotify and Gaana App. But both sounds are playing concurrently. I have iPhone 6s and used Safari browser to check.
And as Limitless Claver said it's correct only that at a time only 1 sound is playing. Since if you hear 2 sounds at the same time it will become noise for the user. And I can bet that user won't like it at all. So it's perfect to pause all other background sounds when a user is surfing your website.
There is nothing you can do for this. Since that's handled by the browser apps itself. There is nothing as of now we can do in our Website to work the way you want.
While Windows 10 for instance allows this to happen (had two youtube tabs running with sound and another application delivering separate audio), I really question whether this is a good idea on a phone where you basically can only have one app open at any time.
It appears that Apple allows for this to happen, but its depending on the app itself, so nothing you can change for anything but your own app, AFAICT.
My goal is to present clients with a video from youtube (iframe api) that cannot be skipped or seeked forward. On all platforms but iOS this is simple. But I'm having problems with Apple's fullscreen player.
Once playback on a video has started, you are transported to Apple's iOS video player, with it's standard controls. What I have been unable to find is if you can hide/disable these controls in the fullscreen layout.
Alternatively, if I can capture events from the iOS player and merely detect when a user is trying to skip would work as well. I've attached events in accordance with the HTMLMediaElement specs, but none of them fire. Nor do any of youtube's events fire.
I am tracking the console through Safari from the iOS simulator, which could be a problem on it's own.
Any help would be appreciated. I've gone through every SO post on the subject.
While I was unable to find anyway to hide the iOS default viewer (I believe it's impossible), I was able to get the youtube events to fire. With keeping an interval, and checking that against the video's time each time an event is fired, I can figure out if a user has skipped.
I have created a Web App which plays music playlist and it works well on desktop browsers and also in mozilla and opera of android. But When I play the songs on Chrome browser of Android and I turn off the screen, it stops after playing the current song. And as soon as I turn the screen on, it starts loading the next song in line.
From my observations, what I have understood is Google Chrome browser on android pauses the javascript code from executing if the screen is turned off till the screen is not waken up again. Is there any way I can prevent my specific library from pausing? Any approach or events?
Some related this question is what I am looking for: JavaScript halts in inactive android Chrome tab
There are so many WebApps which does not stop playing music. Does it need some permissions from Google App Store?
check what happens with youtube, at least few years ago i had an awful time dealing with that and that's what proved to my client it cant be done in the given time frame and budget. that was actually device specific, on some devices it worked fine and on others it didnt. check if it happens on other devices. the only solutions i could think of ware either to prevent screen turn off (on problematic devices or all of them at the beginning), or to build an app and handle onPause event
I don't think that you can change the behaviour of the Chrome app, if they want to save battery in the background and stop the javascript, you won't reactivate it.
There are maybe some other ways to get it working.
Tell your users that they should use Firefox or Opera on their mobile device.
All apps are allowed to play or stream music in the background, so you could make or use an app for your task.
Maybe you can use the default music player app on android. Open a playlist of streams using the app. (I don't know if this is possible, because I have no android device.)
I know that is not exactly what you want, but a maybe a way to get it working.
I'm using an embedded media player on my website to allow blackberry users to listen to audio without having to download it. (I'm testing this on blackberry bold 9700 and so any cool html5, flash or embed tags wont work) The reason I have it embedded is because I want to be able to keep track of a users listening time.
Basically what I want is to be able to know when a user clicks play or pause. How do I gain control of these buttons? possibly using some jquery?
This is my code for the player:
<object data="myfilepathHere" type="audio/mpeg">embedded track isnt working!</object>
This is the site I used as a reference:
http://devblog.blackberry.com/2009/08/blackberry-browser-embedded-media-content-automatic-playback-how-to/
I can get the two buttons play/pause and stop to show up (and it looks just like it does in the link I've provided) on the blackberry and the track to play so if I can get this to work that would be just dandy. thanks! :D
Sorry, I spent some time trying some ideas out and I'm pretty certain it's not possible to track or listen to any events on the Object. You really need the Audio tag on BBOS 6.0 and higher. If you were doing a WebWorks app instead of a website we have an API that would help (https://developer.blackberry.com/html5/apis/blackberry.audio.player.html).
Supporting 6.0+ is not that bad. You may find that the majority of people who visit your site have that version or higher.
Is there a way to show the controls after a video has started playing. Basically, I'm playing a video with play(), and I want the controls to stay up for a few seconds. Currently (at least on my Android device), the controls fade once the video starts.
Toggling the controls attribute doesn't work, unfortunately.
HTML5 video on Android (iOS too) is not opened inline but in the native player (i.e. outside the browser), so the <video>-tag attributes have no control over what is going to happen in the player.
I don't know if it's possible to "hack" / set-up the native player so I guess you'll have to do research on that. I don't know of any way to remotely influence the behavior of the Android application unfortunately. In case you find out something it would be nice if you could let me know btw.
Also see a recent question of mine (which is rather discouraging unfortunately).