How to Embed a Youtube Playlist in Mobile - mobile

I have this code and I embed a Youtube playlist to my website
<iframe width="300" height="165"
src="PLAYLIST_URL?autoplay=1&showinfo=0&loop=1&list=PLAYLIST_ID&rel=0"
frameborder="0" allowfullscreen></iframe>
This works in desktop and it auto play and loop. But I can only listen one track in mobile and does not auto play (iPhone 4S, iOS 7).
This is my webpage : www.hqtunes.com
How can I fix the embed code and can auto play and loop, like on desktop?

Based this thread, autoplay cannot be done on iOS and Android devices. For various reasons (including, but not limited to data usage), Apple doesn't allow auto-playing of videos. You may also check this documentation which stated that "Warning: To prevent unwanted downloads on mobile networks at the user's expense, playback of embedded media can not be launched automatically in Safari for iOS, and only the user can start playback."

Related

Embedded SurveyMonkey survey not appearing on mobile

I'm looking to embed an existing survey monkey survey into a webpage, following the instructions here:
http://help.surveymonkey.com/articles/en_US/kb/Website-Collector
which is working perfectly on desktop and tablet sizes, but for some reason not working on mobile (either on an android device or in chrome emulator)
The following steps appear to be working:
Loading embed script into the page
Embed script calls surveymonkey.com, and retrieves the SMCX script
SMCX.boot() is called
But, the survey (or its markup) does not appear in the page.
Has anyone else run into this issue? What other additional information can I provide?
The Website Collector used to work everywhere, but they changed their API and now document that mobile is not supported.
http://help.surveymonkey.com/articles/en_US/kb/Website-Collector
"Website Collectors display on desktop browsers only—not on mobile devices or tablets."
It's actually worse than not supporting mobile or tablets, their surveys don't even load on desktop browsers if your browser is currently 760 pixels or less wide.
The solution is to just iframe the web link in manually.
<iframe height="500" width="500" src="https://www.surveymonkey.com/r/XL3DDMS"></iframe>
In addition to the answer of using iframe, for iPhone, both in Safari and Chrome rendered a weird view (the spacing between each question is extremely large), and I finally tackled it by turn off the "One Question at a Time" option, hope this helps someone.

AngularJS: Embedding Youtube videos in iframe does not work on Android Chrome

I'm developing a web application with AngularJS and I'm using a directive for embedding responsive Youtube videos called youtubeResponsive which allows to embed videos in an iframe with a video id as source parameter.
It all works perfectly on desktop browsers, in fact I also managed to embed a playlist and play it in a loop.
The problem I'm having is now on Chrome Android, on a Nexus 5 device (running Lollipop latest update) the video embedded is not showing and instead I can see a notification of a download going on. Every time I refresh I see the download process restarting but no video is showing. If I click on the download notification to see the file nothing happens.
Of course my aim is to display the video also on mobile with autoplay and loop active.
The output which I can see inspecting the page on mobile using USB debugging (chrome://inspect/#devices)
<iframe id="ytplayer" type="text/html" width="100%" height="202.5" ng-src="http://www.youtube.com/v/ZhfUv0spHCY?version=3&autoplay=1&loop=1&controls=0&showinfo=0&rel=0&wmode=opaque" frameborder="0" allowfullscreen="" video-slug="ZhfUv0spHCY" class="ng-isolate-scope" src="http://www.youtube.com/v/ZhfUv0spHCY?version=3&autoplay=1&loop=1&controls=0&showinfo=0&rel=0&wmode=opaque"></iframe>
I don't see any error on mobile except the same warning I can see on desktop which apparently is not blocking the video from playing at least there.
Resource interpreted as Document but transferred with MIME type application/x-shockwave-flash:
"https://www.youtube.com/v/ZhfUv0spHCY?version=3&autoplay=1&loop=1&controls=0&showinfo=0&rel=0&wmode=opaque".
Anyone experienced the same issue on Android Chrome or on other mobile devices and OS ?
I haven't started testing on AOSP or iOS yet but already on Chrome the issue is quite concerning. Let me know if anyone managed to fix it.
You're specifically requesting the old Flash player widget and not allowing it to upgrade to HTML5, which is required now for mobile support of any kind. You should switch to the YouTube Player API, which requires a few extra lines of code to implement but will work almost anywhere and give you a lot of event data back about videos playing, etc.
https://developers.google.com/youtube/iframe_api_reference
You can still use an IFRAME with this technique, although consider this directive which appears to support the current API:
https://github.com/brandly/angular-youtube-embed

Stream live video to Android and iPhone smartphones

I am developing a live video streaming solution for a client with the following requirements:
- Stream live video to high-end Android and iPhone devices, from a mobile-optimized web app (NOT native apps)
- The video should not be full screen but partial screen, so that other HTML content can be displayed below the video
So my question is, what is the video format/technology that allows live video streaming in both devices? I've heard about HLS but I am not sure it plays in both devices.
And also, is there a way to prevent the video from going full screen? I've come across this in SO http://broken-links.com/tests/video/, but it's for on demand video. Could it also apply for live video streaming?
Thanks in advance
You should set allowsInlineMediaPlayback attribute of your UIWebView instance to YES for iOS.
From Apple's UIWebView reference page:
allowsInlineMediaPlayback
A Boolean value that determines whether HTML5 videos play inline or
use the native full-screen controller.
#property(nonatomic) BOOL allowsInlineMediaPlayback Discussion The
default value on iPhone is NO.
In order for video to play inline, not only does this property need to
be set on the view, but the video element in the HTML document must
also include the webkit-playsinline attribute.
For Android, AFAIK default behaviour of Android's WebView is not triggering media player with fullscreen. You should be able to use WebView as is.
You can get information about supported video formats with those links:
iOS Media Layer Supported Video Formats
Android Supported Video Formats
There are two major industry standards, I guess it won't be a problem if I understand your concerns correctly.
Hope that helps.

Mobile devices web browser simulator

I'm looking for iPhone, iPad, Android and other mobile and smartphones web browsers simulators on x86. I would like to check how my web application written for standard web browser will be displayed on these devices.
The dev kits for these platforms include platform emulators, in which you can run the browser for that platform and load your web site to see how it will look.
http://developer.android.com/guide/developing/tools/emulator.html
http://developer.apple.com/programs/ios/develop.html
I'm programming a web application for mobile and I use JQueryMobile.
You can have more informations here :
http://jquerymobile.com/gbs/
if you just want to quickly view how a webpage would render at various mobile device resolutions then synthphone.com is a nice little webpage...
http://synthphone.com
you can even link directly to a url via query strings. for example, here is one that should load the Sencha Touch 2 carousel. Use your mouse like a finger to slide around the images etc.
http://www.synthphone.com/?u=http://dev.sencha.com/deploy/touch/examples/production/carousel/index.html
have fun!

How do I test a website design on a mobile device?

I have designed my site with a 900 x 600 fixed background image. On the computer it looks fine. How will it look on a PDA device? Will I have to design it separately for PDA?
How should check whether my site can be browsed effectively from mobile phone?
What should I do?
Try using Opera's "small screen" view (View > Small Screen). This does a pretty decent job of simulating a mobile screen. Try it on Opera's own site. Note that they use a "handheld" type stylesheet that kicks-in when you're viewing on a handheld or switch to small screen mode.
You can download Google's Android SDK for free to test on.
To test on iPhone, see the iPhone Tester. There's a button on the bottom-right to rotate the iPhone into its widescreen state.
The OpenWave Phone Simluator is supposed to be good.
You can try the mobi online emulator.
The Windows Mobile 5.0 SDK for Smartphone contains "Windows Mobile 5.0 based Smartphone Device Emulator images & skin files"
Finally, some general guidance: Web Content Accessibility and Mobile Web: Making a Web Site Accessible Both for People with Disabilities and for Mobile Devices
Instead of browser detection, you can supply alternative stylesheets for handheld devices. With
<link rel="stylesheet" href="small.css" type="text/css" media="handheld">
The advantage is that you only need one version of your site, the difference lies in the stylesheets. You need one additional css, while with browser detection you would need different versions of every page in your site. The downside is that not all browsers support the media attribute for stylesheets. But the most modern browsers do, and the support for it is growing.
If you are interested, I recommend having a look at an A List Apart article.
BTW, if you are not using css yet, switch to it immediately, no matter which solution for your problem you choose. CSS rocks!
You can also get device emulators for the Blackberry range of machines.
Well, you could always throw some detection javascript in there to check the type of browser, then redirect to a different site that is formatted for mobile devices. This seems to be the norm for most sites.
Examples:
Digg.com
Twitter.com
Google.com

Resources