Jump to content

Play video files in Unigui Application. I need an example


PALF

Recommended Posts

Hi alf.

 

Try it, I tested on jwplayer (version JW FLV Media Player 5.7), I downloaded from here: http://webi.ru/base/files/tovar/jw_flv_media_player_5_7.zip

 

 

Embedding the JW Player on your website:

 

1. Download http://webi.ru/base/files/tovar/jw_flv_media_player_5_7.zip and copy the files (swfobject.js, player.swf) in the directory "files"

 

2. add CustomFiles:

files/swfobject.js
files/player.swf

in UniServerModule

 

3. Add a video file to the directory "files", for exampe files/flowplayer.flv

 

4. Add UniHTMLFrame1 to Form

 

5. UniHTMLFrame1 - > add HTML:

<div id="player"></div>

6. UniHTMLFrame1 - > add AfterScript:

var so = new SWFObject('files/player.swf','mpl','400','250','8');
so.addParam('allowfullscreen','true'); 
so.addParam('flashvars','file=flowplayer.flv');
so.write('player');

7. AddMimeType in UniServerModule:

procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject);
begin
  MimeTable.AddMimeType('flv', 'FLV');
end;

it's just a simple example, if you will read the documentation, there are many possibilities... good luck!

 

post-906-0-84439400-1400142972_thumb.png

 

  • Upvote 3
Link to comment
Share on other sites

or on UniPanel:
function afterrender(sender, eOpts){
  var so = new SWFObject('files/player.swf','mpl','400','250','8');
  so.addParam('allowfullscreen','true'); 
  so.addParam('flashvars','file=flowplayer.flv');
  so.write(this.id); 
}

post-906-0-92488300-1400221497_thumb.png   post-906-0-25678400-1400224984_thumb.png

 

 

 

Link to comment
Share on other sites

  • 4 years later...

 

or on UniPanel:
function afterrender(sender, eOpts){
  var so = new SWFObject('files/player.swf','mpl','400','250','8');
  so.addParam('allowfullscreen','true'); 
  so.addParam('flashvars','file=flowplayer.flv');
  so.write(this.id); 
}

attachicon.gifjwplayer2.png   attachicon.gifjwplayer3.png

 

 

I implemented all instructions, when I run the WebApp, the video does not show, what am I doing wrong

Thanks Johan

Link to comment
Share on other sites

Hi,

 

Did you follow these instructions ?

 

Embedding the JW Player on your website:

 

1. Download http://webi.ru/base/files/tovar/jw_flv_media_player_5_7.zip and copy the files (swfobject.js, player.swf) in the directory "files"

 

2. add CustomFiles:

files/swfobject.js
files/player.swf

in UniServerModule

 

3. Add a video file to the directory "files", for exampe files/flowplayer.flv

 

4. Add UniHTMLFrame1 to Form

 

5. UniHTMLFrame1 - > add HTML:

<div id="player"></div>

6. UniHTMLFrame1 - > add AfterScript:

var so = new SWFObject('files/player.swf','mpl','400','250','8');
so.addParam('allowfullscreen','true'); 
so.addParam('flashvars','file=flowplayer.flv');
so.write('player');

7. AddMimeType in UniServerModule:

procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject);
begin
  MimeTable.AddMimeType('flv', 'FLV');
end;

it's just a simple example, if you will read the documentation, there are many possibilities... good luck!

 

attachicon.gifjwplayer.png

 

Link to comment
Share on other sites

Yes I did, I also tried the uniPanel, same problem, Microsoft Edge and Chrome gives no response, Microsoft Internet Explorer says "Video not found or access denied".

I am compiling the App as an exe file which I then run on my development PC (local)

Regards

Johan

Link to comment
Share on other sites

I did some more "research"

I managed to get the example App working with a mp4 video file, but not with a flv file.

And

I had to find settings in Google Chrome to allow the mp4 file to be played by the example App.

In Microsoft Internet Explorer it works with the mp4 file without fiddling with IE settings.

In Microsoft Edge I had no luck at all.

Just thought I should share this

Regards

Johan

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...