internal RemotePlayer(PlayerController controller, Uri contentUri, string mimetype, string deviceId, int deviceType) { this.mController = controller; this.mContentUri = contentUri; this.mMimeType = mimetype; this.mDeviceId = deviceId; this.mDeviceType = deviceType; // Connect to AllShare Service. Processing continues when // service instance is received in onCreated callback method. SmcDeviceFinder df = new SmcDeviceFinder(controller.mContext); df.StatusListener = this; df.start(); }
internal LocalPlayer(PlayerController controller, Uri content) { this.mController = controller; // Create and initialize Android MediaPlayer instance. mPlayer = new MediaPlayer(); try { mPlayer.setDataSource(controller.mContext, content); mPlayer.prepare(); controller.Duration = mPlayer.Duration / 1000; } catch (IOException) { // Ignored for application brevity } }