I used both video component
Video video = new Video();
and embedded
Embedded embed = new Embedded("my video", new ExternalResource("yyy/xxx.mp4"));
embed.setMimeType("application/x-shockwave-flash");
This plays quite well in iphone which uses safari browser, but in my pc am using mozilla firefox browser its not playing.
It shows an like error in mime type.
Can you check this code from vaadin sampler :
Embedded e = new Embedded(null, new ExternalResource(
"http://www.youtube.com/v/meXvxkn1Y_8&hl=en_US&fs=1&"));
e.setAlternateText("Vaadin Eclipse Quickstart video");
e.setMimeType("application/x-shockwave-flash");
e.setParameter("allowFullScreen", "true");
e.setWidth("320px");
e.setHeight("265px");
addComponent(e);
It works for me both chrome and firefox. I think your firefox addons may cause this problem.
Related
I have backend (asp net core) sending video file like so
public FileResult PlayVideo([FromRoute] string fileUrl)
{
string path = Path.Combine(_env.WebRootPath, "files/") + fileUrl;
return PhysicalFile(path, contentType: "video/webm", enableRangeProcessing: true);
}
in frontend I create blob from this route's response
fetch(source, options)
.then((response) => response.blob())
.then((blob) => {
console.log(blob)
setUrl(URL.createObjectURL(blob));
});
This blob is then used in video source
<video controls src={url} ref={videoPlayerRef} className="video-player" onClick={(e) => e.preventDefault()} />
Im using Browserstack to test and this works well on windows Chrome and Firefox (although Firefox gives warning to console failed to load URI but plays it anyway)
I't also works on Android phones, tested with Chrome and Firefox.
Problem is on IOs devices, video wont play on iPhone safari / chrome / firefox
also wont play on Mac safari / chrome / safari
What can I do to make it work on IOs devices ?
Is there any way to open a window and playing a youtube video inside my hololens app?
I did search about opening youtube video page, but it will open outside of my, i want player to be inside of my app.
For HoloLens 1, the suggestions provided by Hernando in the comments are good.
I wanted to also share that it is possible to do this on HoloLens 2 and Windows Mixed Reality simply by launching a URI. This will launch a flat application window directly in your unity app. For example, have a look at "the Launch External Apps pull request" which shows the behavior in the HandInteractionExamples scene (available in MRTK RC2 release, or latest mrtk_development branch).
The code to launch an external URI within your app is as follows:
#if WINDOWS_UWP
UnityEngine.WSA.Application.InvokeOnUIThread(async () =>
{
bool result = await global::Windows.System.Launcher.LaunchUriAsync(new System.Uri("https://youtu.be/SB-qEYVdvXA"));
}, false);
#else
Application.OpenURL("https://youtu.be/SB-qEYVdvXA");
#endif
This code was taken from LaunchUri.cs, modified to just launch a YouTube video.
I have a desktop/mobile web app that needs to display a pdf stream on the target device. I now have this working on the desktop using the jquery dialog. For mobile tho...my html View page has the following link:
View PDF
And that correctly takes me into the Controller Action:
public ActionResult PdfView(string id = "")
{
PayStubDataEntity ps = PayStubAccess.GetPayStubByID(new Guid(id), new Guid(Session["Session_Application_UserID"].ToString()));
WebHelper.SetHeadersForDownload(System.Web.HttpContext.Current.Response, "application/pdf", "PayStub.pdf", false);
MemoryStream pdfMemoryStream = SendPayStubToBrowserAsPdf(ps);
//WebHelper.SendFile(System.Web.HttpContext.Current.Response, "application/pdf", "PayStub.pdf", false, pdfMemoryStream);
return File(pdfMemoryStream, "application/pdf");
}
But nothing ever shows up on my iphone emulator (electric plum). No error messages. I am not sure where the output s/b going or how to view it? Any ideas would be most appreciated.
We have this same issue with android phones and there can be two issues going on. If the website uses ssl and the phone you are on does not accept it as a valid ssl, it will say downloading pdf in the manager, but it never completes a download.
The second issue is the file you are sending to the phone needs to be named in order to download properly to the phone.
Ex: return File(pdfMemoryStream, "application/pdf", fileDownloadName:"PayStub.pdf");
I would suggest using Google Chrome for phone emulation. When you change the settings, it will behave similarly to the phone and you can debug easily.
For example, when I set Google Chrome to the mobile phone user agent Android 4.0.2, it will download the pdf, instead of displaying within the web browser. When it does that, I know it is working locally. It also has iPhone emulation.
I'm trying to find a player that actually works with HTML5 and wordpress and yours has come close.
I'm on an Apache server hosted through godaddy.
The link below is the page I'm testing on. In Chrome it auto loads one version while still showing the play button. Upon hitting play, another version starts, thus two playing at once.
In firefox it just won't load at all. the poster frame shows, but video never plays (according to godaddy the ogg/ogv mime type is there.)
In safari it works fine.
http://parkmultimedia.com/test/
Here is the code i'm using -
[video mp4="http://www.parkmultimedia.com/flv/2012-reel.mp4" webm="http://www.parkmultimedia.com/flv/2012-reel.webm" ogg="http://www.parkmultimedia.com/flv/2012-reel.ogg" flv="http://www.parkmultimedia.com/flv/2012-reel.flv" poster="http://www.parkmultimedia.com/flv/webstill.png" preload="true" autoplay="false" width="480" height="272" align="center"]
Any help would be appreciated!
Dan
UPDATE
OK, I've managed to get the above page to work after some tinkering. Chrome, Safari, Firefox all seem to work no. I'm going to have opera and PC friends test IE.
Fix - Set the default video to mp4 and I used this code -
[video flv="http://www.parkmultimedia.com/flv/2012-reel.flv" mp4="http://www.parkmultimedia.com/flv/2012-reel.mp4" poster="http://www.parkmultimedia.com/flv/webstill.png" preload="true" autoplay="false" width="480" height="270"]
Using my iPod (yes pod, not pad) I get the play button with a line through it...though I also get the loading wheel...it just keeps loading.
Also, and I will search for this, but also an issue - in the new and old script I have autoplay set to false, but in Chrome and Safari it does it anyway. Is there an override setting or a way to control by browser?
Lastly, is there a way to center the player and not have it aligned left?
Thanks for any assistance, Dan
I'm writing a video encoder/server to serve video to a web application intended to run on an iPad. The iPad uses an HTML5 video tag to retrieve and decode the video, and I'm running into issues where the encoded video isn't being decoded correctly.
Is there anything like a system log on the iPad where I can find any information about what the video decoder finds objectionable in my bitstream, or any other way of getting some visibility into the decoding process?
Older versions of IOS allowed you to turn on the Safari debug console (settings ->safari->advanced -> debug console). This was handy for logging errors etc. If you are a mac user apparently there is a nice interface for doing so.
If you have desktop Safari you can also fake the user agent see: http://www.dummies.com/how-to/content/how-to-activate-user-agent-switcher-in-safari.html this will allow you to use web debug tools to see whats going on.
Alternatively you can create a 'Debug' panel in your webapp and hijack the console.log function so you can see errors etc.
Example:
<div id="debug-info"></div>
<script>
(function(){
var oldLog = console.log;
console.log = function (message) {
// DO MESSAGE HERE.
oldLog.apply(console, arguments);
$('#debug-info').prepend('<p>'+message+'</p>')
};
})();
</script>