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

9
LINES

< > TinyBrain | #1003198 - hEmbedYoutube

JavaX fragment (include)

static S hEmbedYoutube(S youtubeID) {
  ret hEmbedYoutube(youtubeID, 300, 250);
}

static S hEmbedYoutube(S youtubeID, int w, int h) {
  youtubeID = extractYouTubeID(youtubeID);
  ret 
"<object width=\"" + w + "\" height=\"" + h +"\"><param value=\"http://www.youtube.com/v/{*}&showsearch=0&rel=0&fs=1&autoplay=0&amp;ap=%2526fmt%3D18\" name=\"movie\" /><param value=\"window\" name=\"wmode\" /><param value=\"true\" name=\"allowFullScreen\" /><embed width=\"" + w + "\" height=\"" + h + "\" wmode=\"window\" allowfullscreen=\"true\" type=\"application/x-shockwave-flash\" src=\"http://www.youtube.com/v/{*}&showsearch=0&fs=1&rel=0&autoplay=0&amp;ap=%2526fmt%3D18\"></embed></object><br /><a href=\"http://www.youtube.com/watch?v={*}\" target=\"_blank\">View on YouTube</a>".replace("{*}", youtubeID);
}

download  show line numbers  debug dex   

Travelled to 2 computer(s): cfunsshuasjs, ddnzoavkxhuk

No comments. add comment

Snippet ID: #1003198
Snippet name: hEmbedYoutube
Eternal ID of this version: #1003198/2
Text MD5: 5399b8e3bc6888b48c91c6fc7258c716
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-07-15 23:16:42
Source code size: 810 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 79 / 70
Version history: 1 change(s)
Referenced in: [show]