Changed to use onserverfound interface 26/32926/5 tizen
authorAlice Liu <alice.liu@intel.com>
Tue, 30 Dec 2014 10:52:07 +0000 (18:52 +0800)
committerMikko Ylinen <mikko.ylinen@intel.com>
Wed, 7 Jan 2015 06:31:17 +0000 (22:31 -0800)
Changed to use mediaServer.onserverfound which is defined
on the MediaServer API spec. addEventListener interface is
not supported by SDK Web Simulator which uses Google Chrome
as backend.

link: http://01org.github.io/cloud-dleyna/mediaserver.html
Bug-Tizen: TC-2255
Change-Id: I74d12581462158566b0699f3456dbd97bbe18fe1
Signed-off-by: Xianlu Chen <xianlu.chen@intel.com>
Signed-off-by: Alice Liu <alice.liu@intel.com>
js/remotecontent.js

index 08a47aa..46e9eaa 100644 (file)
@@ -64,9 +64,9 @@ RemoteContent.prototype.scanMediaServerNetwork = function() {
        if (!!self.mediaServer) {
                self.clearDisappearedMediaSources();
 
-               self.mediaServer.addEventListener('serverfound', function(source) {
+               self.mediaServer.onserverfound = function(source) {
                         self.addMediaSource(source.server);
-                });
+                };
                self.mediaServer.scanNetwork();
        }
 };