플레이어에 텍스트를 인쇄하는 플래시 플러그인을 개발하려고합니다. 내 질문은 그것을하는 방법입니다? 거기에 플레이어에 텍스트를 넣을 함수가 있습니까?JWPlayer Plugin
0
A
답변
0
에 텍스트를 추가하기 위해 CSS와 자바 스크립트의 조합을 사용 할 수 있습니다 선수를 위해 그러나 그것은 너 자신에 의하여 아주 쉬운해야한다.
먼저 플래시 플러그인 생성을위한 JWPlayer의 documentation입니다.
그러면 플러그인의 디스플레이에 스프라이트와 텍스트 필드를 추가하기 만하면됩니다.
먼저, .as 파일의 시작 부분에서 관련 플래시 클래스를 가져와야합니다.
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를 사용하고 출력 URL
을 제공 할 수있는, 비디오에 텍스트를 넣어이 파일을 만들 수 있습니다 당신은 자신의 공식 웹 사이트에 자막을 추가하는 방법에 대해 자세한 정보를 찾을 수 있습니다
다른 방법 단지 텍스트를 표시 할 기본 제공 함수가 없습니다 위해 VideoPlayer 컨테이너
관련 문제
- 1. 초보자를위한 jwplayer 스트리밍
- 2. JWPlayer 캐시 이미지
- 3. JWPlayer playing video
- 4. JWPlayer 및 보안 비디오
- 5. jwPlayer 변수를 jquery에 전달합니다.
- 6. jwplayer 이벤트가 실행되지 않음
- 7. JWPlayer 이벤트가 작동하지 않습니다.
- 8. jwplayer - 시작 감지
- 9. jwplayer 전체 화면 버튼
- 10. 다른 도메인의 jwplayer 스트리밍 m3u
- 11. jwplayer 플레이 링크 된 비디오
- 12. jwplayer 스트리밍 비디오를 다운로드하는 방법?
- 13. 설정 후 JWPlayer 스킨 설정
- 14. 초기 재생시 JWPlayer 검은 색 화면
- 15. 포인터가 전체 화면에서 사라집니다. jwplayer 6
- 16. jwplayer url에 변수를 전달할 수 없습니까?
- 17. Jwplayer 내가 같은 JWPlayer을 구현하기 위해 노력했다
- 18. JWplayer 투명한 화면 색상 매개 변수
- 19. mp4 스트리밍 jwplayer 및 다운로드 속도 제한
- 20. 스트리밍 비디오 - jwplayer, amazon s3 및 cloudfront
- 21. JWPlayer AJAX 요청으로 인한 고르지 비디오
- 22. SWFObject를 사용하여 JWPlayer 포함 - 스킨 적용
- 23. JWPlayer + Nginx + ngx_http_mp4_module을 사용하여 문제가 발생했습니다.
- 24. jQuery jScrollpane plugin plugin 이상한 행동
- 25. wordpress plugin : 검색어의 post-ID in plugin?
- 26. Jquery Validation plugin and nyromodal Plugin
- 27. Facebook Plugin
- 28. Datatables plugin
- 29. Liquid plugin
- 30. Firediff Plugin