Skip to content

Commit

Permalink
use of auto and Video Player
Browse files Browse the repository at this point in the history
  • Loading branch information
slackmoehrle committed Aug 28, 2014
1 parent 8088dd8 commit 00bcff2
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions 8.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,19 @@ A `Parallax` Node is a special `Node` type that simulates a parallax scroller. Y
```

## Video (Experimental)
Video playback is supported as an experimental feature. The format of the video is dependent upon the formats the players operating system supports.
Video playback is supported as an experimental feature. The format of the video is dependent upon the formats the players operating system supports. This feature is currently experimental since it only works for iOS and Android.
```cpp

// play a video from a URL
auto videoPlayer = cocos2d::experimental::ui::VideoPlayer::create();
videoPlayer->setContentSize(Size(x,y));
videoPlayer->setURL("http://example.com/video.mp4");
videoPlayer->play();

// play a video from a local file
auto videoPlayer = cocos2d::experimental::ui::VideoPlayer::create();
videoPlayer->setContentSize(Size(x,y));
videoPlayer->setFileName("filepath/video.mp4");
videoPlayer->play();
```

0 comments on commit 00bcff2

Please sign in to comment.