도전2022

YouTube View Example 본문

작업/work2014

YouTube View Example

hotdigi 2014. 1. 17. 20:10

일부 패스가 잘못되어서 동작이 안됨. 

path를 잡아주거나, 나처럼 강제로 파일 위치를 잡아주거나. 



youtubeview.zip




Demonstrates how to embed a web view in a Qt Quick application


The YouTube View QML example uses a WebView to play HTML5 video clips from YouTube.




The application makes use of an XmlListModel to query the YouTube API for HTML5 video clips and lists thumbnails of the clips in a ListView at the top. The WebView loads a local player.html file that embeds a YouTube HTML5 video player using the IFrame player API, which allows to control the YouTube player using JavaScript.


When clicking on a thumbnail, the corresponding clip is loaded in the WebView by passing the video ID as a query string to player.html. When the video is started, the thumbnail list is hidden with an animated fade-out, when the video is stopped the list is showed again. The specific states of the player change the title of the WebView using document.title in JavaScript. The application is acting on these title changes in the onTitleChanged slot of the WebView item and thus switches between specific states. By default the application loads a list of movie trailers.


When clicking on the button below the thumbnail list, the application switches to search mode, which allows to search for videos using keywords. Additionally it is also possible to choose from a number of preset movie trailer streams.




This example uses the QtWebKit QML API that utilizes the WebKit2 split-process architecture.


Files:


webkitqml/youtubeview/youtubeview.qml

webkitqml/youtubeview/content/YouTubeDialog.qml

webkitqml/youtubeview/youtubeview.pro

webkitqml/youtubeview/youtubeview.qrc

© 2013 Digia Plc and/or its subsidiaries. Documentation contributions included herein are the copyrights of their respective owners.

The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.

Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.

'작업 > work2014' 카테고리의 다른 글

DTV Shredder  (0) 2014.01.24
QtGStreamer on Windows  (0) 2014.01.22
qt 5.2.0 설치 로그  (0) 2014.01.17
구글의 웹 등록 테스트  (0) 2014.01.17
구글의 웹마스터  (0) 2014.01.17