Jump to content

Ask unimvidemo how to loop to play a list?


huayan889

Recommended Posts

procedure TMainmForm.UnimFormCreate(Sender: TObject);

begin

 

  UnimVideo1.Urls.Clear;

  UnimVideo1.Url :='files/0622v2.mp4';

   UnimVideo1.Play;

end;

 

 

 

procedure TMainmForm.UnimVideo1Ended(Sender: TObject);

begin

  UnimVideo1.Url := 'files/small.mp4';

  UnimVideo1.Play;

end;

//This is modified, but the play is still the last one,Player list cannot be changed

Link to comment
Share on other sites

Hi,

 

We will check this issue,

 

Can you try this approach for now ?!:

procedure TMainmForm.UnimVideo1Ended(Sender: TObject);
begin
  UnimVideo1.Url := 'files/test.mp4';
  UnimVideo1.JSInterface.JSCode(#1'.media.dom.src="'+ UnimVideo1.Url +'";');
  UnimVideo1.Play;
end;

Best regards,

  • Upvote 1
Link to comment
Share on other sites

Hi, I would like to know how, I do to play .mp3 on UnimVideo example:

 

I tested with

UnimVideo1.Url: = 'http: // localhost: 8077 / files / test_02.mp3'; It worked

 

but I would like to reproduce like this

UnimVideo1.Url: = 'files / test_02.mp3';

 

and also like to give a stop in the middle of the playback and then change the sample file

 

UnimVideo1.stop;

UnimVideo1.urls.clear

UnimVideo1.Url: = 'files / test_02.mp3';

UnimVideo1.play;

Link to comment
Share on other sites

and also like to give a stop in the middle of the playback and then change the sample file

 
UnimVideo1.stop;
UnimVideo1.urls.clear
UnimVideo1.Url: = 'files / test_02.mp3';
UnimVideo1.play;

 

You can try to use this approach for now:

 

Hi,

 

We will check this issue,

 

Can you try this approach for now ?!:

procedure TMainmForm.UnimVideo1Ended(Sender: TObject);
begin
  UnimVideo1.Url := 'files/test.mp4';
  UnimVideo1.JSInterface.JSCode(#1'.media.dom.src="'+ UnimVideo1.Url +'";');
  UnimVideo1.Play;
end;

Best regards,

Link to comment
Share on other sites

I did the following .. I opened the example that came in the folder ..Framework \ uniGUI \ Demos \ Touch \ Video

 

I put a

UnimButton1 with the code

 

 UnimVideo1.Urls.Clear;

 UnimVideo1.Urls.Text: = 'files / 2037.mp3'; (this file 2037.mp3 is in the files folder)

 UnimVideo1.Play;

 

and tested via browser on the computer

 

 

another question too and I would like to pause and change the file you are playing, for another example:

 

reproducing this

 UnimVideo1.Urls.Clear;

 UnimVideo1.Urls.Text: = 'files / 2037.mp3'; (this file 2037.mp3 is in the files folder)

 UnimVideo1.Play;

 

I put a

UnimButton1 with the code

UnimVideo1.stop;

 

 UnimVideo1.Urls.Clear;

 UnimVideo1.Urls.Text: = 'files / 2038.mp3'; (this file 2038.mp3 is in the files folder)

 UnimVideo1.Play;

 

however it does not for it continues in the previous file even I changing

 

 

My goal is to make a mp3 player, where I can show you events

 

* if playing

* if you have finished playing

* change the volume

pause

* change the file you are playing
Link to comment
Share on other sites

 managed to make 99% what I needed

 

use this command in play

 

UnimVideo1.Stop;

UnimVideo1.JSInterface.JSCode (# 1'.media.dom.src = "'+ edt_link_musica.Text +'"; ');

UnimVideo1.Play;

 

 

I have not used UnimVideo1.Url

 

When I want to go back to the previous song, I

 

UnimVideo1.Stop;

UnimVideo1.JSInterface.JSCode (# 1'.media.dom.src = "'+ edt_link_musica.Text +'"; ');

UnimVideo1.Play;

Link to comment
Share on other sites

  • 1 year later...

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...