參考http://www.jianshu.com/p/4cd6fe89114e
這裡的videoPlayer:setFileName(pathMp4) 是播放本地影片
若是線上的要用videoPlayer:setURL("http://1.mp4")
沒辦法播rtmp
只有android跟ios可以使用
需要在appDelegage.cpp裡加入:
#include 中
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
#include "lua_cocos2dx_experimental_video_auto.hpp"
#endif
#載入binding中
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
register_all_cocos2dx_experimental_video(L);
#endif
有一篇關於影片層級的問題。如果讓cocos2dx元件在影片之上
http://discuss.cocos2d-x.org/t/cocos2dx-videoplayer-playback-below-ui-elements-ios-android/26321
沒有留言:
張貼留言