Languages

Menu
Sites
Language
How to play a Video on youtube.com web page

Hi All,

I cannot play a video from http://www.youtube.com/embed/XGSy3_Czz8k in Native App.

I use Tizen SDK v 2.1.

    // String videoFilePath = App::GetInstance()->GetAppResourcePath() + L"tizen.mp4";
    String videoFilePath = App::GetInstance()->GetAppResourcePath() + L"http://www.youtube.com/embed/XGSy3_Czz8k";

    // Creates an instance of Player
    __pPlayer = new Player();
    __pPlayer->Construct(*this, &bufferInfo);
    __pPlayer->SetLooping(true);
    __pPlayer->OpenFile(videoFilePath);
    __pPlayer->Play();

Thanks

 

Responses

2 Replies
Chintan Gandhi

Hi Cristiano,

App::GetInstance()->GetAppResourcePath()  searches the content in your "res" folder of your project. You need to place the video in that folder and then give the respective file name.

Thanks.

hgw7

OpenFile() is used when you want to play a file from memory.  To play streaming content use OpenUrl() in the Player class.