我想開發Flash插件,它將在播放器上打印一些文本。我的問題是如何做到這一點?我的意思是有沒有什麼功能可以在播放器上放置一些文字?JWPlayer插件
0
A
回答
0
上添加文字有沒有內置函數來顯示文本的其他方式對於球員來說,但是你自己應該很容易做到。
首先,這裏是JWPlayer的documentation用於創建Flash插件。
然後你想要做的是添加一個精靈和文本字段到插件的顯示。
首先,您需要在.as文件的開頭導入相關的Flash類。
import flash.text.TextField
import flash.text.TextFormat;
import flash.display.Sprite;
然後你想要創建一個Sprite和一個TextField。將TextField放入Sprite中,將Sprite放入播放器的顯示控件中。
var textHolderSprite:Sprite = new Sprite();
var displayText:TextField = new TextField();
displayText.width = 200; // set size of your text field
displayText.height = 300;
displayText.x = 50;//and position it.
displayText.y = 100;
displayText.text = "hello world";//set the text you want to display.
displayText.wordWrap = true; // wrap text if you want to.
displayText.selectable = false; //probably want to make it not selectable.
displayText.textColor = 0xFFFFFF; //set the text colour;
//bonus: set font size and alignment; look at TextFormat documentation for more options.
var displayTextFormat:TextFormat = new TextFormat();
displayTextFormat.size = "17";
displayTextFormat.align = "center";
displayText.setTextFormat(displayTextFormat);
//put the TextField inside the sprite.
textHolderSprite.addChild(displayText);
//the following api object, is a com.longtailvideo.jwplayer.player.IPlayer object, as described in the JWPlayer plugin documentation.
var displayControl:MovieClip = (api.controls.display as MovieClip); //get the player's display control.
displayControl.addChild(textHolderSprite);//add youre sprite.
//When you're done with the text, don't forget to remove the sprite.
displayControl.removeChild(textHolderSprite);
祝你好運!
0
JWPlayer支持SRT文件(字幕),這樣你就可以創建這個文件把文字上的視頻,如果你需要這些文本生成,你可以將它也許使用PHP,然後給輸出網址
做你可以找到更多的信息,如何在自己的官方網站上添加字幕
可以只使用CSS和JavaScript的組合,將錄像機容器
相關問題
- 1. Flash插件未能加載 - jwplayer
- 2. 我該如何開始構建Jwplayer插件(插件)?
- 3. jwplayer文件名:
- 4. JWPlayer,Soundcloud文件源
- 5. 如何插入視頻與JWPlayer
- 6. 使用託管在* my *服務器上的JWPlayer插件
- 7. 將值插入JWPlayer setup數據庫的「文件」源
- 8. jwplayer事件不起作用
- 9. JWPlayer的文件瀏覽器
- 10. jwplayer 6:獲取文件名
- 11. jwplayer事件未解僱
- 12. .htaccess私人文件夾jwplayer
- 13. JWPlayer事件不起作用
- 14. Jwplayer不玩m3u8文件?
- 15. 在jwplayer
- 16. JWPlayer刷新頁面錯誤:無法加載插件:未找到文件
- 17. 自定義JwPlayer
- 18. 使用jwplayer + HTML5
- 19. ExtJS和JWplayer
- 20. Jwplayer with angularjs
- 21. JWPlayer,DIV,jQuery
- 22. 的UIWebView與jwplayer
- 23. 響應在jwplayer
- 24. jwplayer不工作
- 25. jwplayer和tinymce
- 26. crossdomain.xml的不jwplayer
- 27. jwplayer - 黑屏
- 28. jwplayer --->如何獲得一個流的文件名與jwplayer一起玩
- 29. 通過PHP的JWPlayer和Proxying MP3文件
- 30. jwplayer不加載視頻文件