How to play a video

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
0
0

This is probably a stupid question, but: How on earth do you play a video in WiseJ?

I have a video control on my form.  I set the “SourceURL” property to the name of the video.  The video is saved in the web site root directory.  On form load I call video.Play();   Nothing happens.

Is there an example or am I hopefully missing something ridiculously obvious?

  • You must to post comments
0
0

Hi Andrew,

not a stupid question at all.

IIS and IIS express do need to have the mime type registered.
Add this to your web.config:

<system.webServer>
<staticContent>
<remove fileExtension=”.mp4″ />
<mimeMap fileExtension=”.mp4″ mimeType=”video/mp4″ />
</staticContent>

Please note that only mp4, ogg, webm, asf and flv formats are supported.

Best regards
Frank

 

  • Frank (ITG)
    Hi Andrew, you can take a look at the various options discussed here: http://wisej.com/support/question/application-downloadpath-name-result-in-redirected-to-download-wx-and-404-error Hope that helps, Frank
  • redcard
    This was helpful. But now I have another issue. When the user clicks “Play” we open a dialog box that contains the video control. I added the handler to write the bytes of the file to the response stream, so the video plays correctly. But when the user closes that dialog, the audio of the video continues to play. It’s not a huge deal for now. I tried calling Dispose() on the video control on FormClosing, but that didn’t help. Any suggestions?
  • Frank (ITG)
    Hi Andrew, will check in more detail later, but maybe calling Pause() on the video control can help as a quick work around ? Best regards, Frank
  • redcard
    That works, thanks
  • conrad
    Can the video “SourceURL” be a link to YT, Vimeo or SC? I’m trying a YouTube link and I get “Invalid Content” even after changing the web.config as indicated above.
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 5, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json