• I love this plugin.

    The functionality for the missing/broken player is rather important thou.

    So I’ve implemented something so that when you click on the play icon it will show you a message that you need to install the web player.

    Here are the steps in case you wanna do it:

    Go to the wordpress admin section -> plugins, and click edit on UnityDog.
    Select unitydog/unitydog.js

    Replace these lines:

    case "broken":
    	console.log( "Unity Player broken!" );
    	return;
    	break;
    case "missing":
    	console.log( "Unity Player missing!" );
    	return;
    	break;

    (lines 48 – 55)

    with these lines:

    case "broken":
    	var missing_content = "";
    	missing_content += "<div align='center'> \n";
    	missing_content += "  Your Unity Web Player is broken,";
    	missing_content += "  please use the link below to reinstall it, and then restart your browser:<br /><br />\n";
    	missing_content += '<div class="broken">';
    	missing_content += '<a href="https://unity3d.com/webplayer/" title="Unity Web Player. Install now! Restart your browser after install." target="_blank">';
    	missing_content += '<img alt="Unity Web Player. Install now! Restart your browser after install." src="https://webplayer.unity3d.com/installation/getunityrestart.png" width="193" height="63" />';
    	missing_content += '</a>';
    	missing_content += '</div>';
    	missing_content += "</div> \n";
    	jQuery('.unitydog').css("background-color", "white").css("height", "130px").html(missing_content);
    	return;
    	break;
    case "missing":
    	var missing_content = "";
    	missing_content += "<div align='center'> \n";
    	missing_content += "  This content requires the Unity Web Player,";
    	missing_content += "  please use the link below to install the player, and then refresh this page:<br /><br />\n";
    	missing_content += '<div class="missing">';
    	missing_content += '<a href="https://unity3d.com/webplayer/" title="Unity Web Player. Install now!" target="_blank">';
    	missing_content += '<img alt="Unity Web Player. Install now!" src="https://webplayer.unity3d.com/installation/getunity.png" width="193" height="63" />';
    	missing_content += '</a>';
    	missing_content += '</div>';
    	missing_content += "</div> \n";
    	jQuery('.unitydog').css("background-color", "white").css("height", "130px").html(missing_content);
    	return;
    	break;

    Maybe the owner can update the plugin with this.

  • The topic ‘Missing "install player message" fix’ is closed to new replies.