- var playBarHeight = mediaNameCanvas.height;
- var boxWidth = playBarHeight * 0.75;
- mediaNameCTX.clearRect(0,0,mediaNameCanvas.width, mediaNameCanvas.height);
-
- if (currentPlayerType === "AUDIO")
- {
- var shadeJump = 10;
- var alphaJump = 0.01;
- var currColor = 255;
- var currAlpha = 1.0;
-
- mediaNameCTX.fillStyle="rgba(30,30,30,0.5)";
- mediaNameCTX.strokeStyle="rgba(130,130,130,1)";
- mediaNameCTX.lineWidth = 5;
- mediaNameCTX.fillRect(0,0,mediaNameCanvas.width, playBarHeight);
- mediaNameCTX.strokeRect(-20,0,mediaNameCanvas.width + 40, playBarHeight);
-
- if (newCover === undefined || newCover.naturalWidth === undefined || newCover.naturalWidth <= 0)
- {
- newCover = musicIcon;
- }
-
- mediaNameCTX.drawImage(newCover, 20, (playBarHeight - boxWidth) / 2, boxWidth, boxWidth);
-
- if (screenOrientation === "portrait")
- {
- var textStartX = boxWidth + 50;
-
- var trackText = new TextObject(mediaNameCTX,{"text" : newTitle, "xLoc" : textStartX, "yLoc" : 70 , "zLoc" : 0,
- "width" : mediaNameCanvas.width - textStartX, "height" : 50, "lineHeight" : 65, "wordWrap" : true});
- trackText.applyTemplate(mainMenuTitleTemplate);
-
- var artistText = new TextObject(mediaNameCTX,{"text" : newArtist, "xLoc" : textStartX, "yLoc" : 70, "zLoc" : 0,
- "width" : mediaNameCanvas.width - textStartX, "height" : 50, "lineHeight" : 50, "wordWrap" : true});
- artistText.applyTemplate(mainTrackTemplate);
- }
- else
- {
- var textStartX = boxWidth + 50;
- var trackText = new TextObject(mediaNameCTX,{"text" : newTitle, "xLoc" : textStartX, "yLoc" : 50 , "zLoc" : 0,
- "width" : mediaNameCanvas.width - textStartX, "height" : 30, "lineHeight" : 30, "wordWrap" : true});
- trackText.applyTemplate(mainMenuTitleTemplateLandscape);
- var artistText = new TextObject(mediaNameCTX,{"text" : newArtist, "xLoc" : textStartX, "yLoc" : 50, "zLoc" : 0,
- "width" : mediaNameCanvas.width - textStartX, "height" : 30, "lineHeight" : 30, "wordWrap" : true});
- artistText.applyTemplate(mainTrackTemplateLandscape);
- }
-
- trackText.drawObj();
- trackText.drawLargeShadow();
-
- artistText.yLoc += trackText.height;
- artistText.drawObj();
- }