Skip to content

Instantly share code, notes, and snippets.

@seflless
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seflless/975f3cae5493a0b45d60 to your computer and use it in GitHub Desktop.
Save seflless/975f3cae5493a0b45d60 to your computer and use it in GitHub Desktop.
Red5Pro Beta Issue
// Get a reference to the SDK, but alias it to a module local variable so that
// there will never be any future global name collisions on the name secondscreenHost
var secondscreenHost = window.secondscreenHost.noConflict();
// Disable logging, turn it on for more information on the state of
// the system
secondscreenHost.setLogLevel(secondscreenHost.LogLevels.NONE);
// Start the second screen service. This starts the process of connecting to
// the Red5Pro Registry service to make an instance of an app disoverable by
// the mobile app
secondscreenHost.start({
// This is the name that will be displayed in the list on the mobile app
// that users use to choose which host app to connect to
name: "Multi Draw",
// No more than 10 players can connect.
maxPlayers: 10,
// This is the legacy Brass Monkey registry. It is now possible
// to self host your own registry server via a Red5Pro subscription
// or to use the hosted Red5Pro service
registryUrl: "ws://162.242.210.105:6262/secondscreen",
//registryUrl: "ws://localhost:6262/secondscreen",
appId: "secondscreen",
swfobjectUrl: 'scripts/red5pro/swf/swfobject.js',
swfUrl: "scripts/red5pro/swf/secondscreenHost.swf",
minimumVersion: {
major: 0,
minor: 0
},
// Set the controller mode to use HTML based controls. There are some
// other simple built in controllers. See the Red5Pro Second Screen HTML5
// documentation for more details
controlMode: secondscreenHost.ControlModes.HTML,
// Specify the url of our HTML5 based controller. To make sure we don't
// have caching issues with the controller, we add a random parameter to
// prevent caching
controlsUrl: "controller/controller.html?cachebust=" + (new Date().getTime()),
error: function(error) {
// The SDK failed to connect to the registry servers.
// TODO: Recommend a recovery strategy for that case. I'm not sure if
// there are automatic retries. Will need to research further
secondscreenHost.log.error('Registry connection error: ' + error);
},
success: function() {
// The SDK successfully connected to the registry servers
secondscreenHost.log.info('Registry connected.');
}
});

Steps to reproduce

  1. Install the Android app
  2. Open the app on your phone
  3. Select Second Screen
  4. Settings
  • Server: 162.242.210.105
  • Port: 8088
  • App Name: secondscreen
  1. Open the drawing app webpage
  2. Select Multi Draw from host list.
  3. A dialog pops up saying: Unfortunately, Red5Pro has stopped. [OK]

Device

Galaxy Note 4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment