Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muchisx/veme
https://github.com/muchisx/veme
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/muchisx/veme
- Owner: muchisx
- Created: 2021-01-27T23:39:03.000Z (almost 4 years ago)
- Default Branch: gh-pages
- Last Pushed: 2023-11-11T21:35:56.000Z (about 1 year ago)
- Last Synced: 2023-11-11T22:29:23.571Z (about 1 year ago)
- Language: HTML
- Homepage:
- Size: 23.2 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
height: '100%',
width: '100%',
playerVars: { 'autoplay': 1, 'controls': 0, 'loop':1, 'playlist': 'PX9-us-1t4I', 'mute':1 ,'autohide':1, 'fs':1,'disablekb':1 },
videoId: 'PX9-us-1t4I',
events: {
'onReady': onPlayerReady,
}
});
}
function onPlayerReady(event) {
event.target.playVideo();
}
var done = false;
function onPlayerStateChange(event) {
if (event.data == YT.PlayerState.PLAYING && !done) {
setTimeout(stopVideo, 6000);
done = true;
}
}
function stopVideo() {
player.stopVideo();
player.playVideo();
}$('.ytp-large-play-button.ytp-button').trigger('click');
$(function() {
var video = $("#someVideo").get(0);fakeClick(function() {
player.playVideo();
});
});