I Have the following code to play a video.
When I leave the view I can still hear the video playing in the background.
What do I need to do to stop this?
// Save iframe content as a file
Dim outFile As FolderItem = SpecialFolder.Documents.Child("YouTube.html")
Dim output As TextOutputStream
output = TextOutputStream.Create(outFile, TextEncoding.UTF8)
output.Write(Embed(num))
output.Close
ImageView.Visible = false
HTMLViewer1.Visible = true
// Load the file into the HTMLViewer to display the embedded YouTube video
HTMLViewer1.LoadURL(outFile.URLPath)
[quote=391632:@Jeremie Leroy]iOSHTMLViewer has no ExecuteJavascript method.
But you might be able to execute javascript like this (untested)
[code]Declare Function jsString lib “UIKit” selector “stringByEvaluatingJavaScriptFromString:” (obj_id as ptr, script as CFStringRef) as CFStringRef
call jsString(iOSHtmlViewer1.handle, “someJavascriptCode”)
[/code][/quote]
I posted a class once upon a time so you could evaluate JavaScript. Its still somewhere on the forum Ill see if I can find it. This definitely should work though