How can I use a UIWebview to load content from a asp.net website dynamically loading .mp4 video and get the video to play? - uiwebview

I have a client that has a website. The website current allows users to login and search for and play .mp4 video. The list of playlist is created dynamically where values are stored in a sql server 2008 database. My client's site is already built for smartphone utilization and did not want to recreate an iphone app. Besides it would mean loading thousands of video. Instead I thought I would use the UIWebview to load the website. This seemed to work well. However, when you try to click on and play video within the UIWebview nothing happens. This is not the case if we launch the mobile website within the apple mobile safari browser. The vide plays by kicking off in the iPhone video player. Is there any way to accomplish this same functionality with a uiwebview? Any guidance or help is appreciated.

UIWebView will play video using <video> if everything is set up correctly, either remote files or local files will work (if they are the correct format).
What does your video tag look like? In particular your src.
If you want to, for example, play an inline video the html5 for that would be something like
<video id="theVideo" controls width="280" height="160" src="yourVideo.mp4" webkit-playsinline></video>
And it would be necessary in the UIWebView to set this line
self.webView.allowsInlineMediaPlayback = YES;
Or you can also explicitly load the media player, but doing everything in HTML5 is neat and tidy and easy.

Related

How to embed azure media services live stream to a personal website

I have created a simple live stream using Azure Media Services. I can view it from Azure Media Player but I want to be able to embed the video to my personal website using the <Video></Video> HTML tag. I've been looking for a solution but I can't seem to find one. Is this even possible?
The HTML5 tag does not always support playback of HLS or DASH depending on the platform you are on.
https://caniuse.com/?search=hls
https://caniuse.com/?search=dash
Sounds like you are trying to playback HLS or DASH from Azure Media Services with just an HTML5 video tag and no javascript player framework. That won't work in most browsers.
Review https://howvideo.works/ for background on how HLS and DASH actually work in the browser - and the reason that you need access to a javascript library and the Media Source Extension feature of HTML5 (not always available in all browsers - see https://caniuse.com/mediasource)

Don't download mp3 on page load - jplayer

I am using jplayer and it loads all mp3 files on page load. Its not only slowing down page loading but also eating up bandwidth. Is there a way that jplayer downloads and play mp3 after user clicks play button. OR do I have to use a player that will stream audio files.
There is a preload option in jPlayer:
The jPlayer constructor option jPlayer({preload}) is used to control
when jPlayer begins downloading new media. Some browsers will begin
the download for the whole media when the preload option is "metadata".
Others will require that "auto" is used. The only way to ensure
download does not begin automatically is to use the preload option "none".
Remember that, the media may not download as it depends on the browser
you are using. Mobile browser such as Mobile Safari on iOS 4.2 require
a gesture before any media is downloaded or played. ie., The user must
press a button to initiate the load or play operations the 1st time.
jPlayer-option-preload
Alternatively you can leave the player without mp3 for initial page load and only add it when the user clicks play. See this demo for an example of loading media to the player: http://jplayer.org/latest/demo-02-jPlayerPlaylist/

In XPages I can't get the File Upload Control to work inside of Mobile Controls

Now that iOS devices can upload from their picture library or camera, I'm trying to use the file upload control to get ahold of these pictures via an xpage. If it's a plain XPage it's working fine - but if I try to wrap this inside of the Mobile Controls from the extension library I can't get the picture to save. Other values save to the document but not the picture.
The file upload control is bound to a rich text field.
Any ideas would be appreciated!!!!
Place the file upload inside an Iframe.
Interesting. Are you saying that you can make the file upload control work with an XPage on an iOS device? I was of the clear impression that you do not have access to the camera from a web-app. In this case you need to wrap your web-app into a layer that can access the physical (e.g. Apache Cordova aka PhoneGap)....?
I know that some of these features are on their way in html5, however, the have so far been very unreliable (crashing the phones often).
/John

Easiest way to sound of an audio file for notification purposes on a website?

It has to work on IE8 and above, and the rest of the modern browsers (Firefox, Chrome, Opera).
Related question:
How to play a notification sound on websites?
I've tried using the Yahoo! Media Player, but it refuses to pick up on my .mp3 links despite them looking like:
<a id="wolf-blue" href="/Public/audio/wolf.mp3">a</a>
Assuming I have a .mp3 file and I want to play it when a timer reaches 0, what do you suggest I use to play this sound file? I do not want to show my users any sort of player UI, just play the sound.
You'll want to check out jPlayer. It's an HTML5 Audio player that has fallback to Flash for browsers that don't support HTML5.
You can use CSS to completely customize the player, including hiding it from view.

Unable to link directly to WMV video file

I have a wmv video hosted in SharePoint. I've created a Content Editor web part with a bit of custom content and I've placed a simple link to the video Click to view.
There is really nothing special going on here. Some users can click on the link and the video opens in their default video player. Other users see a range of different errors/prompts. Some users are prompted for their network credentials and others receive a generic "Internet Explorer cannot display the webpage.
The same problems occur if I create a generic HTML web page (outside of SharePoint) and have users try to launch the video.
I am trying to avoid embedding the video in the HTML and just have users link directly to the video itself.
Has anyone encountered this issue and do you have any suggestions for making this work?
This appears to be a combination of browser issues and file security.
People are being asked for their network credentials because the file itself is not "public"; it requires authentication to be read, or appears to do so from your description. Different browsers will display different messages when attempting to authenticate for the file.
Additionally, the default player for a browser may not be set or the browser may not allow passoff to third party programs, both of which will generate different messages for different browsers. This will always be an issue for hot-linked videos, and there's nothing you can do about it except use some guaranteed playback platform that all consuming browsers must have installed, such as Flash or Silverlight. That comes with issues all on its own, but such is the nature of the online world.

Resources