Is there a way by which we can play music in the background when it is launched through a WebBrowser control of Windows Phone 8 (using HTML5 "audio" element)?
I am aware that background tasks are not supported for WebBrowser, but is there a workaround?What are the other options of launching Html and JavaScript code, if not a WebBrowser control? Can it be done using XAML / C# / WPF?
Thanks.
I am assuming that you want to open a audio file from webserver / site and want to play it in background on windows phone.
You can use AudioPlayerAgent for do that and another thing I found is for steaming audio file from server is this.
Check out either of these options. Due to some limitation over more lines of code and code complexity, I can not put code blocks here.
For launching getting javascript event back to C# , you can use Browser_ScriptNotify and InvokeScript. Other things depend on you business logic. I do not know how your web server is behaving while managing audiofiles.
As an alternate to using HTML5/JS, you can use AudioStreamingAgent
https://code.msdn.microsoft.com/windowsapps/Background-Audio-Streamer-e85b8deb
or
You can use BackgroundAudioPlayer, here is
downloadable sample code: http://go.microsoft.com/fwlink/p/?LinkId=219073
I strongly suggest you to read this page first, because it includes best practices to follow when you implement background audio in your app:
Background audio overview for Windows Phone 8
Then you should check this page, it has very detailed explanations and the complete source code for the example applications, where you can see not only the full apss but every piece of code behind every functionality. This should be all the information and source code you need.
How to play background audio for Windows Phone 8
Of course if you have a more specific question please provide more information and i will provide a detailed explanation.
Related
I am creating a movie website for a project. In the website I'm going to add movies download links that can be downloaded via torrents. I have seen in some websites that they use torcache.net to provide download links. And my quesion is how to create a magnet link, or how to get a torrent file link that can embed in a html file from websites like torcache.net...
Have you considered just copy and pasting the magnet link from a regular torrent indexing site?
What is going to differentiate your website from a plain old torrent indexer like thepiratebay?
Making a link in html is simply a matter of:
text
Could you please be more specific in your question.
I think the gentleman is asking how, using magnet links, to download the data via torrent network in the application and serve is to the user.
There is a javascript library called WebTorrent that uses WebRTC protocol to transmit data in the browser to other browsers. You can use magnet links or .torrent files.
In the browser, WebTorrent uses WebRTC (data channels) for
peer-to-peer transport. It can be used without browser plugins,
extensions, or installations. It's Just JavaScriptâ„¢. Note: WebTorrent
does not support UDP/TCP peers in browser.
You can see a demo of it where a video clip is streamed in via torrent and after it buffers up a bit, starts playing a short movie. You can also see a visual of the nodes connecting and disconnecting, which is quite cool - https://webtorrent.io
Bonus:
If I want to share large files (> 10Mb) with multiple people I use file.pizza implementation.
Let me explain the scenario first.
I have a simple static dashboard html page with 5 simple charts created with HTML5, CSS
and javascript.
It renders data from a static Json to display the charts.
Its is not online and running in my local system.
There are no back end code which connects to a database.
Now I want to convert this to an Ipad app where I can see the dasboard page without out internet connection.
Kindly provide me a best way to do this.
Regards,
Shanmugam
You can use Apache Cordova (or phonegap) for building native web applications for all major platforms using HTML 5 , CSS and JavaScript.
You can refer to this Blog post on how to easily port existing HTML5 based application to iOS and Android.
Additionally you can also check this link for some more insights.
Im in the process of building a HTML5 based web application which ideally would be made downloadable from a web based url via a link.
Should this link be clicked on a desktop machine, it would bring up some sort of overlay informing the user that they need to be on a mobile device to be allowed the download.
Basically Im looking for a way to enable the download only via a mobile device.
If anyone has a solution or can reference another page that does ( Ive looked but not been able to find anything ) it would be much appreciated.
Thanks in advance.
There is two standard ways to do it:
Check on client (parse UA or detect device features).
Check on server (parse UA).
To parse UA use ua-parser-js on client and you will able to get device type desktop, tablet or mobile. Or with nodejs on server side (it allows you to hide algorithm). But UA parsing is not a assured method (because UA could easily be overwritten).
Device features detection depends on target device. You can check browser plugins, protocol support or something special. This is an example of how does Apple checks iTunes support.
the title basically says it, i have a from with a treeview and a webbrowser control and three buttons. i want the back button to load the previous viewed html file from myresources and the same but opposite for forward?... also how can i and where can i link my external css to my program like my.resources so when i export the program for installing on another machine it still works? and one more thing... how can i intergrate/embed the webbrowser control into my program because as i believe it uses internet explorer and if someone installs my program onto their computer and they have un-installed ie and use firefox it won't work? thank you guys very much, i know it's a lot of questions but you guys are awesome!. thanks
It would be easy for you if you read this web pages from the resource file and then save them to a disk.
In this way you can simply pass the physical path to the Navigate method and similarly you can use GoBack and GoForward and Print methods.
But if you don't want them to save them, you still can read the web pages from the resource file and then use DocumentText property to display the webpage.
Using this method you won't be able to navigate back or forward.
I'm currently learning how to make facebook apps, and I've hit a problem.
Usually when I make flash applications, I can use the index.html and run the swf from a webserver.
However, I tried to make a facebook iFrame app using the same setup, all I get is the Alternative Content Text.
Any experienced flash/facebook developer help would be greatly appreciated by this newbie.
Below is what happen to my tutorial app.
http://apps.facebook.com/jeffcheetest/
Do you have filled the field "App Namespace" in the Developer Application Settings? I think it could be the problem...
Are you using FBML? If so, it may be easier to switch to iframe in order to have the swf work in the .html page as you expect it to work. Otherwise, you will need to implement your swf through fbml tags or fbjs code.