https://github.com/keshavbhatt/qwebengineytplayer
Fully functional QWebengineView based YouTube player widget
https://github.com/keshavbhatt/qwebengineytplayer
qt5 qwebengineview youtube-player youtube-playlist youtube-widget
Last synced: 5 months ago
JSON representation
Fully functional QWebengineView based YouTube player widget
- Host: GitHub
- URL: https://github.com/keshavbhatt/qwebengineytplayer
- Owner: keshavbhatt
- License: gpl-3.0
- Created: 2021-05-08T11:35:15.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-08T12:14:53.000Z (over 4 years ago)
- Last Synced: 2025-05-12T13:11:26.005Z (5 months ago)
- Topics: qt5, qwebengineview, youtube-player, youtube-playlist, youtube-widget
- Language: C++
- Homepage:
- Size: 271 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# QWebengineYtPlayer
Fully functional QWebengineView based YouTube player widget utilizing [YouTube Iframe embed API](https://developers.google.com/youtube/iframe_api_reference) to create an iframe whose source is hosted [here](https://github.com/keshavbhatt/YtTest).> Why we need to host the code ?
YouTube Iframe embed API do not allow playback of some content if the page is hosted locally.
## Features
1. Support playback of all quality
2. Fullscreen support
3. Playlist Playback
4. User uploads playback
5. Video playback## Requirements
You need Qt 5.6 or above with `webengine` and `webenginewidgets` modules to use this widget in your application.## How to use in your Qt Project
Go to your project's source directory, clone the repository to `WebEnginePlayer` directory. (You can remove unwanted files likes images etc once done)git clone https://github.com/keshavbhatt/QWebengineYtPlayer.git WebEnginePlayer
Add these two modules (`webengine` and `webenginewidgets` ) to your .pro file. Add the .pri file in your project's .pro file like below.
include(WebEnginePlayer/src/WebEnginePlayer.pri)
In your code initialize the Widget like this:WebEnginePlayer *webenginePlayerWidget = new WebEnginePlayer(this);
To play a YouTube video:
webenginePlayerWidget->play(videoId);
To play a YouTube playlist:webenginePlayerWidget->playPlaylist(plsylistId);
To play a YouTube user's uploads:webenginePlayerWidget->playAuthorUploads(authorId);
## Screenshots

Screenshot showing the widget being use in one of my application [Playlist-Dl](https://snapcraft.io/playlist-dl) (A full featured YouTube playlist search/download application written in Qt)