I am new to Windows Phone app development and I would like to know what is the best way to embed YouTube videos in Windows Phone 8 App? I would like to provide a list of videos with thumbnails and user should be able to click and watch the video just like any typical app.
Thanks a lot.
I had tried some third party SDKs while I was doing this for Windows 8 but was not happy with any of the solutions.
Finally I resorted to embedding the video in a Web View control and the output was pretty desirable. I have not tried this on Windows Phone but should work as it did on Windows 8 since the underlying browser is the same. Try it out:-
string html = #"<style> body{margin:0; padding:0;} iframe{width:100%;height:480px;}#media screen and (max-width:300px) { iframe{width:100%;height:180px;}} </style><iframe style=""padding:0px;margin-bottom:-20px;"" src=""http://www.youtube.com/embed/" + videoId + #"?rel=0"" frameborder=""0"" allowfullscreen></iframe>";
videoView.NavigateToString(html);
Let me know if this worked for you
First try creating sample video application in Windows Phone App Studio which uses YouTube API services and display videos in application.
Download the source code and refer, How it uses YouTube API services and gets video. Source code will be in MVVM pattern and its the best way to implement. You may get some basic knowledge on how to develop apps that uses YouTube services.
You can refer the source code which uses YouTube API services, which I generated for more information.
Related
I have MP3s and other file formats that I want to provide through my website to iPhone and iPad users. VLC's iOS app seems to fit the bill, but they say
Additionally, third party websites and apps
may include links to open streams directly in VLC for iOS.
Here is the official documentation provided
How can I do that? I can't seem to find any documentation about it. I'm considering making a custom app just to accomplish it, but that seems silly.
Starting from VLC 2.0.2 you can use a link of type:
vlc://path/to/file to have the device open VLC if it is installed.
Also check the VideoLAN forums here
Seen many posts on this around the web but no nearer finding out if it's possible to do...
Have seen http://www.webqr.com/ recommended but I tried uploading the .zip from github (https://github.com/LazarSoft/jsqrcode) for this to phonegap and the compiled app fails on android with "Sorry, native web camera streaming (getusermedia) is not supported by this browser"
Well, I'm not trying to use the webcam really, I want to access the camera on the phone/ipad if possible.
Is it actually possible to do this from HTML5 or does it require a proper native app? (so xcode for the ipad app I have in mind)
I've also seen some plugins for "phonegap" (as opposed to phonegap build) which would also require a mac/xcode so that's not the angle I want to approach it from as I'm trying to do this all from windows if possible.
This may help. it a js plugin. search the phonegap plugin page for 'scanners'
https://build.phonegap.com/plugins/2421
https://github.com/wildabeast/BarcodeScanner/tree/c74e37a
The web app I'm building has audio notifications and a video conference option, so the user normally is going to have speakers and a headset connected to the PC, my client wants that the audio notifications will be played in the main speakers, and the video conference can be done using the headset.
Right now I'm using all html5 for audio and webRTC for video conference, I couldn't find any info about how to do this. May be with flash but not can't find this either.
Solutions in this space are emerging via the use of WebRTC. You can see a sample of a working solution at https://webrtc.github.io/samples/src/content/devices/input-output/
Browser support for this is limited right now though.
Actually sound output is only on Oslevel ... you may have to read about the chrome.audio API which still on experimental level ...
"The chrome.audio API is provided to allow users to get information about and control the audio devices attached to the system. This API is currently only implemented for ChromeOS. "
I thnik this would help if it was availble for all OS so you could redirect sound using this API ...
As exemple of some methods from this API i can list :
getInfo − chrome.audio.getInfo(function callback)
which return all audio output and input devices
setActiveDevices − chrome.audio.setActiveDevices(array of string ids, function callback)
which sets the active devices to the devices specified by |ids|
The problem is Chrome.audio API is only for ChromeOS and sounds output is controlled by other OS... that's it two parallel lines..
Simply do this in your javascript code.
audioElement.setSinkId(deviceId);
There is now an HTML5 audio device redirector Chrome extension called AudioPick. The website is here: https://rain-fighters.github.io/AudioPick/
This is OpenSource under the GNU public license, with a Github repo.
There are some limitations (no Flash sources, and some types of HTML5 sources also will not be found), as indicated on the homepage.
I am looking at building an app that can take a video from a person's media library on their mobile phone and upload it to my servers. As far as I can tell, I'd have to build an application for each type of mobile device I want to include. But if new HTML5 protocols let me upload video files through the browser (and can handle the file size), this would be a preferred method.
Web apps don't have access to the media library on a phone. Use phonegap to get access to the users photos - http://docs.phonegap.com/phonegap_media_capture_capture.md.html
Considering you are using iOS and running the WebApp in iOS' MobileSafari, you have NO access to any system related components, libraries or anything (so no Photos, Videos etc).
And Safari itself does not support file upload. You can add the tag but it will always remain as if had disabled="disabled" attribute.
The only way to access these components is by using a Native code or, like Joel said, PhoneGap since it gives the html pages, access to Native API's through it's JS Framework.
For Android, i have no idea but probably not.
I'm not too familiar with HTML5 so does anyone know if HTML5 will be able to access NFC chips built into mobile devices? Or, can someone suggest another way to do this using some other method? My goal is to produce a cross platform HTML5 web app that can access NFC functionality on NFC equipped phones. I have looked into mobile frameworks like PhoneGap but although they have NFC on their roadmap, they do not have any timelines nor implementation details to offer.
Thanks.
NFC access via some proprietary framework may be possible, but I don't think it's currently built into the HTML 5 spec itself.
PhoneGap uses HTML5 for the main UI of the mobile application, and then takes specific code that you write (javascript API I think), which is then translated into native code for each of the mobile devices it is ported to. So, one option you have is building your main UI in HTML5, and then displaying that in a WebView or equivalent inside a native application, then accessing NFC specific features via the native application and passing it to your webapp via a dynamic URL like http://mysampleapp.com/NFC/somestringofdatafromthenfcthatiwillparsetouseinmyhtml5app
If you are using Phonegap 3.0 and the Cordova CLI you can easily integrate RFID reading capabilities through NFC by using Chariot Solutions Phonegap NFC plugin from Github and following the steps laid out by Øystein Heimark/Dogu in the referenced blog post.
Github: Github repository
Blog:
ADDING RFID CAPABILITIES TO YOUR ANDROID PHONEGAP APPLICATION