Youtube API inside Chrome App - youtube-api

I'm trying to implement a chrome app in which I need to show a embed youtube video.
I tried to use a sandbox html page which use the youtube iframe api but it failed. I got the follow error: Uncaught unload is not available in packaged apps.
Can anyone help me with this problem?

You can do it using a webview. Simply take your embed code and swap the iframe tag for webview. No sandbox required :)
<webview width="560" height="315" src="http://www.youtube.com/embed/ZnuwB35GYMY?rel=0" frameborder="0" allowfullscreen></webview>

Related

iFrame block not showing up in the iPhone

I have a hybrid mobile app in Mendix. In one page of the app, I am displaying some data with text and also video or website URL embedded.
<iframe id="quizWidget-454107" width="100%" height="900px" frameborder="0" border="none" src="https://www.qzzr.com/widget/quiz/fi9xdWl6emVzLzQ1NDEwNw"></iframe>
Here we are embedding this website, and we also embed youtube URL here.
The issue is, this embedded URL(video/website) shows up in a section on Android phone but not in iPhone. May be Safari does not render iFrame correctly.
Any idea what we can replace iFrame with?
please see an answer to a related question here. I believe You need to add <meta> tags to your index.html page to allow the app to load external content, preferable using a Content Security Policy (CSP).

Youtube - Full screen is unavailable

The problem is that I can not play YouTube movies in fullscreen. I am getting the following error: "Full screen is unavailable" (https://gyazo.com/159b3f51db4bb643e6ef10854b18ddd0, see screenshot)
I've tried it in multiple browsers and only one of them is working:
Internet Explorer 10 (versie 10.0.9200.16921) WORKING
The rest of the internet browsers is not working:
Internet Explorer 11 (versie 11.306.10586.0) NOT WORKING
Firefox (versie 46.0.1) NOT WORKING
Google Chrome (versie 50.0.2661.102 m NOT WORKING
Google Chrome (versie 30.0.1700.102 m NOT WORKING
Why is it working in an older Internet Explorer and all new browsers are not?
Also "allowfullscreen" is getting removed when I save in my editor and parameters like "allowfullscreen="true"" are also not working.
<iframe width="560" height="315" src="https://www.youtube.com/embed/Gl7ABg9lnBM" frameborder="0" allowfullscreen></iframe>
I really don't know what is causing the problem so I hope you guys can help me out!
this worked for me, because we are using React, so not sure if this helps: simply change allowfullscreen to allowFullScreen with uppercase "F" and "S". now works in all browsers.

WKWebView/UIWebView get website icon

How can I get the apple-touch-icon or logo of the website using WKWebView or UIWebView? I've read that getting a favicon is possible, however I plan on using the website's logo as a short cut like in iOS Safari and a favicon is too small for it. Is there a way to scrape metadata from a website in webView to get <link rel="apple-touch-icon" href="apple-touch-icon.png">?
In Firefox for iOS we use a User Script (Link to code on Github) to find the icon that then passes them back to the application which downloads them using native code (Link to code on Github).

YouTube API to get the most recent videos (with share URL) from a given channel

can some help me in drafting the right API call to get the most recent video form channel with shared URL (URL which i can embed in my web site)
I was able to get the title and description using the YouTube API version 3. But i am not able to get the "share this video URL".
Thank you
If this is not what you want, I apologize.
If you are asking what I think you are asking. I would just go to the next tab to the right ("Embed"). There is box there with the full embed code for your website. You can either use that code or copy the url out of it.
Just to save you some trouble, here is the code for that particluar video:
<iframe width="420" height="315" src="//www.youtube.com/embed/HhHhacseGw0" frameborder="0" allowfullscreen></iframe>
And the url:
http://www.youtube.com/embed/HhHhacseGw0
If that is not what you are looking for, please let me know.

is it possible to use iframe in phonegap ios application

I've tried a lot of code samples and methods but nothing works.. iframes in phonegap application doesn't load url in src attribute.
I want to learn is it possible to use iframe in a phonegap iOS application. And is there a way to show a website inside my app (except InAppBrowser). InAppBrowser just backgrounds my app and open safari. I want to show a url inside my own interface.
Yes you can have iFrames in your app to show some web pages but you have to be careful about which website you want to load in iFrame because most of the popular websites (FB, Twitter etc) doesn't allow their website to be rendered in iFrame using META tags like this:
<meta http-equiv="X-Frame-Options" content="deny" />

Resources