4 pauseSongbird:
function() {
5 if (songbird.playing && !songbird.paused)
12 resumeSongbird:
function() {
20 pauseVideo:
function() {
21 var obj = document.getElementById(
"mTFlashObject");
24 switch(obj.getAttribute(
"mashTape-provider")) {
31 case "MTV Music Video":
40 youTubeListener:
function(state) {
54 yahooListener:
function(eventType, eventInfo) {
55 if (eventType !=
"done")
60 mtvListener:
function(state) {
63 if (state ==
null || state ==
"stopped") {
68 resizeHandler:
function(e) {
72 var frameWidth = document.getElementsByTagName(
"html")[0].clientWidth;
73 var frameHeight = document.getElementsByTagName(
"html")[0].clientHeight;
76 var swf = document.getElementById(
"mTFlashObject");
80 var newHeight = frameHeight - 25;
81 var ratio = document.getUserData(
"mashTapeRatio");
84 var newWidth = newHeight * ratio;
85 if (newWidth > frameWidth - 25) {
86 newWidth = frameWidth - 25;
87 newHeight = newWidth / ratio;
90 if (frameWidth - newWidth > 120) {
91 document.getElementById(
"content").style.clear =
"none";
92 document.getElementById(
"author").style.display =
"block";
94 document.getElementById(
"content").style.clear =
"both";
95 document.getElementById(
"author").style.display =
"inline";
96 var capHeight = document.getElementById(
"content").clientHeight;
97 if (frameHeight - newHeight < capHeight) {
98 newHeight = newHeight - capHeight;
99 newWidth = newHeight * ratio;
104 if (newWidth != swf.width && newWidth > 150 && newHeight > 50) {
106 swf.width = newWidth;
107 swf.height = newHeight;
119 var
p = document.getElementById(
"mTFlashObject");
120 p.addEventListener(
"onStateChange",
"mashTapeVideo.youTubeListener");
function onYouTubePlayerReady(id)