                 if self.g_alert != nil {
                     self.g_alert.dismissViewControllerAnimated(true, completion: nil)
                 }
+                HKWDeviceEventHandlerSingleton.sharedInstance().delegate = self
+                
+                HKWControlHandler.sharedInstance().startRefreshDeviceInfo()
+                
+                self.playCurrentIndex()
             })
         }
+    }
+    
+    override func viewWillAppear(animated: Bool) {
+        
     }
     
     func loadAssets() {

        }
    }
    
    func hkwPlayEnded() {
        HKWControlHandler.sharedInstance().stop()
    }
}

    }
}

class GameViewController:UIViewController, MTKViewDelegate, HKWPlayerEventHandlerDelegate, HKWDeviceEventHandlerDelegate {
    let device: MTLDevice = MTLCreateSystemDefaultDevice()!
    
    let g_licenseKey = "2FA8-2FD6-C27D-47E8-A256-D011-3751-2BD6"
