Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #1014053 // embedYoutube_newer_autoplay

JavaX fragment (include)

static S embedYoutube_newer_autoplay(S youtubeID) {
  ret embedYoutube_newer_autoplay(youtubeID, 400); // no volume level at 300
}

static S embedYoutube_newer_autoplay(S youtubeID, int w) {
  int h = sixteenToNine(w);
  youtubeID = extractYouTubeID(youtubeID);
  ret ([[<iframe width="]] + w + [[" height="]] + h + [[" src="https://www.youtube.com/embed/{*}?autoplay=1" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>]]).replace("{*}", youtubeID);
}

Author comment

Began life as a copy of #1014052

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1014053
Snippet name: embedYoutube_newer_autoplay
Eternal ID of this version: #1014053/5
Text MD5: 0c538bc0e456bb57330570ce46551e62
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-03-26 01:44:46
Source code size: 486 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 362 / 390
Version history: 4 change(s)
Referenced in: [show references]