mediaBytesTransferred in video js on ios device - http-live-streaming

I have stream video in videoJs.
In order to find out how much traffic is used by my site visitors, I want to measure Total bytes of content downloaded.
I installed video js http streaming(vhs) and With vhs I am able to adjust buffer size through an mediaBytesTransferred property.
this.bufferedSize = +this.player?.tech()?.vhs.stats.mediaBytesTransferred;
It works on all browsers except iOS browsers.
The vhs is undefined in iOS.
According to this link on the Internet(https://github.com/videojs/http-streaming/issues/1102), ios uses native players and vhs is not supported in ios.
I have searched for another solution, but cannot find one.

It's still the case that you can only have native playback on iOS and it will be unless ans until it supports Media Source Extensions.

Related

Azure Media Player playback failure: no compatible source found for the current browser environment (0x10600003)

I'm developing a Video on Demand feature for a Django project of mine. It's going to be powered by Azure Media Services.
Currently, I'm trying to run an uploaded video via the following code:
<video id="azuremediaplayer" class="azuremediaplayer amp-default-skin amp-big-play-centered" controls autoplay width="640" height="400" poster="" data-setup='{"techOrder": ["azureHtml5JS", "flashSS", "silverlightSS", "html5"], "nativeControlsForTouch": false}'>
<source src="{{ video.streaming_url }}" type="video/mp4" />
<p class="amp-no-js">
To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video
</p>
</video>
where {{ video.streaming_url }} contains a streaming url of the sort http://example.streaming.mediaservices.windows.net/66193aae-b739-4cb5-b4b9-f4a4a151c791/myproject.ism/manifest.
My problem is that I get the error no compatible source found for the current browser environment (0x10600003). In fact, I get that error when I go to http://ampdemo.azureedge.net/azuremediaplayer.html as well (i.e. an official azure media player demo).
It seems the 0x10600003 error code implies Autoselect failed to find a player. Note that Youtube videos work perfectly in my environment. My OS is Ubuntu 14.04, and the browser is Mozilla Firefoz 41.0.1. A previous unaccepted answer guided the op to install and enable Silverlight. I can't expect all my users to do that. How do I get playback to work?
Azure Media Player is built on 4 different players, a DASH player, a Flash player, the Silverlight player, and the native implemented player for the browser you're watching the video on. These different "Player Techs" playback different protocols supported my Azure Media Services- DASH, Smooth, and HLS.
AMP intelligently decides which player/playback protocol to use for a specific/device or browser by looking at what technologies/features the browser supports. First, it'll check if the browser supports Media Source Extensions. MSE allows the browser to playback adaptive bitrate streams without the use of plugins like Flash and Silverlight, it's supported in most modern browsers, but not always in older versions of those browsers. If MSE is supported,AMP will playback your content using the MPEG-Dash protocol and you're good to go. If MSE isn't supported, AMP will check and see if Flash is installed and then if Silverlight is installed. If either of these are true it will play back using the installed plugin and the Smooth Streaming protocol. If neither of them are installed, it will try to play back via the native html5 video tag implementation of the browser. This is completely dependent on the browser, and most do not support ABR streams natively (except, for example, Safari via HLS)
Your short answer, given this background information, is that because you are using an older version of FF that does NOT support MSE, you need to install either Flash or Silverlight to play back your adaptive bitrate streams.
a few mitigations for you/customers:
1) install Flash/Silverlight
2) download an up-to-date version of FF, we recommend this for sure because MSE is supported in v42 but in v47+ Google Widevine protected content is supported, which means you can playback DRM encrypted content without Silverlight
see Azure Media Player's Compatibility Matrix for more info on what's supported on which browsers.
If you have any more questions, you can email me at ampinfo#microsoft.com, hope this helps!
I just knocked off the content policy and created a new one and it started working again.

Swiffy - Audio no longer functioning on iPad/Tablet//Mobile

I exported a SWF file using Swiffy a few months back and the audio functions.
http://www.vgidownload.co.uk/Tests/Old.html
Exporting the same file now results in no audio function.
http://www.vgidownload.co.uk/Tests/New.html
Is there something i'm missing here or has something changed between v7.1 and v7.4.
If so is there any way I can have the file export using v7.1 ?
The sound seems to function fine when viewd on a PC through a browser, it is just on iPad/Mobile that it is silent.
Thanks
Matt
Have you tested Old.html on an iPad/Mobile? I just did and there's no sound. Also no sound in Chrome on Galaxy Core Prime. On the same Samsung in the android browser no test was possible because the "START" button doesn't work. Such are the limitations of swiffy on mobiles.
The sound is encoded in Base 64 in the swiffy html file, as are the images. But I could never get the audio to play on mobiles. Further info: How to make audio in swiffy HTML5 files play in mobile browsers? or
Mobile browsers unable to load base64 data uri for an <audio> tag.

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

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.

Can I access the webcam via a browser plugin/add-On?

I was wondering if I can access the webcam via a browser plugin e.g. for Firefox, Safari, Internet Explorer etc?
Are there already similar plugins/add-ons?
Thanks
It's possible to access the webcam through Flash, for instance.
An example of this is Omegle, which uses Flash to access the webcam.
An alternative is doing it in Silverlight, as in this example.
Finally, there's Java, in which you could write an applet to access the webcam. This article should demonstrate this.
If you wish to do it yourself, you will have to write the plugins yourself.
This can be done using the NPAPI for most browsers, or by writing a BHO (Browser Helper Object) for Internet Explorer.
How to interact with the webcam there depends on which language you choose, as you have full access to system libraries.
Note that writing a custom browser plugin is both harder, and a larger hassle for users, as they have to install something new, as opposed to just using their existing browser plugins.
I just found this:
http://www.html5rocks.com/en/tutorials/getusermedia/intro/
One year and a half after this question was made. I haven't tested it, but maybe it'll help.
From the link (just a copy/paste showing how to record something using the camera as input source):
<input type="file" accept="video/*;capture=camcorder">
<input type="file" accept="audio/*;capture=microphone">
None of the major Webbrowser's (IE, FF, Chrome) provide any special support for Webcams. You will need to either use the native OS's API (whatever that may be), or embed Flash in Webbrowser control in your browser plug-in.
You can use Mediadevices.getUserMedia (https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia) to capture webcam stream on browser (chrome and firefox).
To play with webcam stream on safari, you would have to use a pollyfill - https://github.com/Temasys/AdapterJS
To record the video/audio stream, you can make use of Media recorder api https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder
(Note : recording stream is still a challenge in Safari as there is no support/pollyfill. However, it works perfectly on Chrome and Firefox latest versions).To make video recording work on Safari, it maybe worthwhile to explore https://github.com/ronghanghu/webcamjs (Note flash plugin needs to be installed and enabled)
Helpful demonstrations :
https://webrtc.github.io/samples/
https://mozdevs.github.io/MediaRecorder-examples/index.html
https://hacks.mozilla.org/2016/04/record-almost-everything-in-the-browser-with-mediarecorder/

Video format that wouldn't require a browser plugin

What is the recommended (cross-browser) video format to use on websites so that users' browsers (or most of them) wouldn't require to download a plugin to view it?
There is no single video that will play in every browser. If you want it to work across the most browsers, you're going to have to encode your video more than once. Dive into HTML5 video has the gory details.
You nest your video references so that browsers try these in order, falling back if it's not supported:
Ogg Theora
MP4 H.264
A Flash container displaying #2
Number 1 gets you Firefox 3.5 and Chrome. Number 2 gets you Safari and the mobile phone WebKit browsers. Number 3 gets you IE, Firefox ≤3, and Opera.
There is no such format available yet. The best way to go is:
Flash (most of the users have flash plugin installed already, 99% according to http://www.adobe.com/products/player_census/flashplayer/)
OGG (This will be available in HTML5 as standard)
Yes HTML5 will solve some of the problems of not needing a plugin, but different browser vendors have chosen different codecs and file formats. It's complicated, but Dive Into HTML 5 has a great article.
None! but you can do it with HTML 5 which is not implimented by all browsers ...
if you really need a video on your page i would recommend flash or silverlight
In a couple of months HTML 5 will be supported by almost all browsers on this planet. If you are planning to run your services in 2010 just use OGG open standard container format. It is unrestricted by software patents and is designed to provide for efficient streaming and manipulation of high quality digital multimedia. It is already supported by Firefox 3.5 and soon all browsers will support it.
Please look at documentation and wiki on http://www.xiph.org/ogg/
A giant GIF. (You could attach a Javascript image preloader script to the movie to load it.)
Microsoft Video Codec VC1

Resources