55143681 Posted May 17, 2019 Share Posted May 17, 2019 Hello Everyone: I have try unimVideo and I want to know how to use that? 1、UnimVideo->Url: what is the function? I give that "files\1.webm",but do not have any effect 2、UnimVideo->Urls:what is the function? I give some files to that ,but can only play the first file. UnimVideo1->Urls->Add("files\\1.webm"); UnimVideo1->Urls->Add("files\\2.webm"); 3、How to play a new file? I have a UnimList to select a new file,and stop UnimVideo and clear urls and add a new file , but I can not play the new file. UnimVideo will still play the file which UnimVideo have first played. 4、Play postion I test my case with chrome,(In my phone), I find something strange. If I open the chrome first time,I click unimVideo,the movie 's position is right If I open the chrome first time,I don not click unimVideo to play the picture,I click UnimList to call unimvideo to play a video, something strange comes out,(see the picture top),the video played out of the unimVideo's range. 4、UnimVideo->AutoResume:maybe do not have any effect //播放选中视频 UnimVideo1->Stop(); UnimVideo1->Urls->Clear(); UnimVideo1->Urls->Add(UnimList1->Text); ShowToast(UnimVideo1->Url); //UnimVideo1->EnableControls=true; UnimVideo1->Play(); //--------------------------------------------------------------------------- #include <vcl.h> #include <uniGUIVars.hpp> #pragma hdrstop #include "Mainm.h" #include "MainModule.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma link "unimList" #pragma link "uniMultiItem" #pragma link "unimVideo" #pragma link "uniGUIBaseClasses" #pragma link "uniGUIClasses" #pragma link "uniCheckBox" #pragma link "unimCheckBox" #pragma link "unimSlider" #pragma link "uniTrackBar" #pragma resource "*.dfm" //--------------------------------------------------------------------------- TMainmForm *MainmForm(void) { return( (TMainmForm *)UniMainModule()->GetFormInstance(__classid(TMainmForm))); } //--------------------------------------------------------------------------- __fastcall TMainmForm::TMainmForm(TComponent* Owner) : TUnimForm(Owner) { } //--------------------------------------------------------------------------- void T17E60E923306453C9A806C0618FC0E35__RegisterFormClass() { Uniguivars::RegisterAppFormClass(__classid(TMainmForm)); Uniguiregclasses::CPPInit(); } #pragma startup T17E60E923306453C9A806C0618FC0E35__RegisterFormClass void __fastcall TMainmForm::UnimFormCreate(TObject *Sender) { //添加视频清单 //for (int i=0;i<UnimVideo1->Urls->Count;i++) // { // UnimList1->Items->Add(UnimVideo1->Urls->Strings); // } UnimSlider1->Position=UnimVideo1->Volume;//音量 UnimList1->Items->Add("files\\1.webm"); UnimList1->Items->Add("files\\2.webm"); UnimList1->Items->Add("files\\3.webm"); UnimList1->Items->Add("files\\4.mp4"); UnimList1->Items->Add("files\\4.webm"); //UnimVideo1->Url="files/1.webm"; UnimVideo1->Urls->Add("files\\2.webm"); } //--------------------------------------------------------------------------- void __fastcall TMainmForm::UnimList1Select(TObject *Sender) { //播放选中视频 UnimVideo1->Stop(); UnimVideo1->Urls->Clear(); UnimVideo1->Urls->Add(UnimList1->Text); ShowToast(UnimVideo1->Url); //UnimVideo1->EnableControls=true; UnimVideo1->Play(); } //--------------------------------------------------------------------------- void __fastcall TMainmForm::UnimCheckBox1Click(TObject *Sender) { //静音播放 if(UnimCheckBox1->Checked) UnimVideo1->Muted=true; else UnimVideo1->Muted=false; } //--------------------------------------------------------------------------- void __fastcall TMainmForm::UnimCheckBox2Click(TObject *Sender) { //循环播放 if(UnimCheckBox2->Checked) UnimVideo1->Loop =true; else UnimVideo1->Loop =false; } //--------------------------------------------------------------------------- void __fastcall TMainmForm::UnimCheckBox3Click(TObject *Sender) { //自动复位 if(UnimCheckBox3->Checked) UnimVideo1->AutoResume=true; else UnimVideo1->AutoResume=false; } //--------------------------------------------------------------------------- void __fastcall TMainmForm::UnimSlider1Change(TObject *Sender) { //调整声音大小 UnimVideo1->Volume=UnimSlider1->Position; } //--------------------------------------------------------------------------- demo_4_4_2.zip Quote Link to comment Share on other sites More sharing options...
55143681 Posted February 7, 2020 Author Share Posted February 7, 2020 On 5/17/2019 at 8:45 AM, 55143681 said: Hello Everyone: I have try unimVideo and I want to know how to use that? 1、UnimVideo->Url: what is the function? I give that "files\1.webm",but do not have any effect 2、UnimVideo->Urls:what is the function? I give some files to that ,but can only play the first file. UnimVideo1->Urls->Add("files\\1.webm"); UnimVideo1->Urls->Add("files\\2.webm"); 3、How to play a new file? I have a UnimList to select a new file,and stop UnimVideo and clear urls and add a new file , but I can not play the new file. UnimVideo will still play the file which UnimVideo have first played. 4、Play postion I test my case with chrome,(In my phone), I find something strange. If I open the chrome first time,I click unimVideo,the movie 's position is right If I open the chrome first time,I don not click unimVideo to play the picture,I click UnimList to call unimvideo to play a video, something strange comes out,(see the picture top),the video played out of the unimVideo's range. 4、UnimVideo->AutoResume:maybe do not have any effect //播放选中视频 UnimVideo1->Stop(); UnimVideo1->Urls->Clear(); UnimVideo1->Urls->Add(UnimList1->Text); ShowToast(UnimVideo1->Url); //UnimVideo1->EnableControls=true; UnimVideo1->Play(); //--------------------------------------------------------------------------- #include <vcl.h> #include <uniGUIVars.hpp> #pragma hdrstop #include "Mainm.h" #include "MainModule.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma link "unimList" #pragma link "uniMultiItem" #pragma link "unimVideo" #pragma link "uniGUIBaseClasses" #pragma link "uniGUIClasses" #pragma link "uniCheckBox" #pragma link "unimCheckBox" #pragma link "unimSlider" #pragma link "uniTrackBar" #pragma resource "*.dfm" //--------------------------------------------------------------------------- TMainmForm *MainmForm(void) { return( (TMainmForm *)UniMainModule()->GetFormInstance(__classid(TMainmForm))); } //--------------------------------------------------------------------------- __fastcall TMainmForm::TMainmForm(TComponent* Owner) : TUnimForm(Owner) { } //--------------------------------------------------------------------------- void T17E60E923306453C9A806C0618FC0E35__RegisterFormClass() { Uniguivars::RegisterAppFormClass(__classid(TMainmForm)); Uniguiregclasses::CPPInit(); } #pragma startup T17E60E923306453C9A806C0618FC0E35__RegisterFormClass void __fastcall TMainmForm::UnimFormCreate(TObject *Sender) { //添加视频清单 //for (int i=0;i<UnimVideo1->Urls->Count;i++) // { // UnimList1->Items->Add(UnimVideo1->Urls->Strings); // } UnimSlider1->Position=UnimVideo1->Volume;//音量 UnimList1->Items->Add("files\\1.webm"); UnimList1->Items->Add("files\\2.webm"); UnimList1->Items->Add("files\\3.webm"); UnimList1->Items->Add("files\\4.mp4"); UnimList1->Items->Add("files\\4.webm"); //UnimVideo1->Url="files/1.webm"; UnimVideo1->Urls->Add("files\\2.webm"); } //--------------------------------------------------------------------------- void __fastcall TMainmForm::UnimList1Select(TObject *Sender) { //播放选中视频 UnimVideo1->Stop(); UnimVideo1->Urls->Clear(); UnimVideo1->Urls->Add(UnimList1->Text); ShowToast(UnimVideo1->Url); //UnimVideo1->EnableControls=true; UnimVideo1->Play(); } //--------------------------------------------------------------------------- void __fastcall TMainmForm::UnimCheckBox1Click(TObject *Sender) { //静音播放 if(UnimCheckBox1->Checked) UnimVideo1->Muted=true; else UnimVideo1->Muted=false; } //--------------------------------------------------------------------------- void __fastcall TMainmForm::UnimCheckBox2Click(TObject *Sender) { //循环播放 if(UnimCheckBox2->Checked) UnimVideo1->Loop =true; else UnimVideo1->Loop =false; } //--------------------------------------------------------------------------- void __fastcall TMainmForm::UnimCheckBox3Click(TObject *Sender) { //自动复位 if(UnimCheckBox3->Checked) UnimVideo1->AutoResume=true; else UnimVideo1->AutoResume=false; } //--------------------------------------------------------------------------- void __fastcall TMainmForm::UnimSlider1Change(TObject *Sender) { //调整声音大小 UnimVideo1->Volume=UnimSlider1->Position; } //--------------------------------------------------------------------------- demo_4_4_2.zip An old question,Can anyone help me? Quote Link to comment Share on other sites More sharing options...
55143681 Posted February 8, 2020 Author Share Posted February 8, 2020 On 2/7/2020 at 10:20 AM, 55143681 said: An old question,Can anyone help me? Test with unigui1517,the error still be there,Can you help me? Sherzod. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.