dibesw Active Member Licensed User Longtime User May 3, 2013 #1 Hi, I hope someone can solve my problem about Webview I would like to display my IP Cam from Webview control. This is my url that I see through Google Crome: This is my code: Code: 'Activity module Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. End Sub Sub Globals Dim webview1 As WebView End Sub Sub Activity_Create(FirstTime As Boolean) webview1.Initialize("") webview1.Enabled=True Activity.LoadLayout("IP") webview1.LoadUrl("http://192.168.1.92/mjpg/1/video.mjpg") 'webview1.LoadUrl("http://www.basic4android.com") End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub Sub WebView1_UserAndPasswordRequired (Host As String, Realm As String) As String() Return Array As String("admin", "1234") End Sub This is that I see from my android emulator: . where is the error? Thank you in advance:sign0085:
Hi, I hope someone can solve my problem about Webview I would like to display my IP Cam from Webview control. This is my url that I see through Google Crome: This is my code: Code: 'Activity module Sub Process_Globals 'These global variables will be declared once when the application starts. 'These variables can be accessed from all modules. End Sub Sub Globals Dim webview1 As WebView End Sub Sub Activity_Create(FirstTime As Boolean) webview1.Initialize("") webview1.Enabled=True Activity.LoadLayout("IP") webview1.LoadUrl("http://192.168.1.92/mjpg/1/video.mjpg") 'webview1.LoadUrl("http://www.basic4android.com") End Sub Sub Activity_Resume End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub Sub WebView1_UserAndPasswordRequired (Host As String, Realm As String) As String() Return Array As String("admin", "1234") End Sub This is that I see from my android emulator: . where is the error? Thank you in advance:sign0085:
Erel B4X founder Staff member Licensed User Longtime User May 3, 2013 #2 Android doesn't natively support mjpeg. You should also test it with a real device instead of an emulator. Upvote 0
Android doesn't natively support mjpeg. You should also test it with a real device instead of an emulator.
dibesw Active Member Licensed User Longtime User May 3, 2013 #3 Thank you Erel, but I have tested it from My Samsung Tab2 but the problem is the same. Probably webview is not the correct way? I tried also with LOADVIDEO Code: vv.Initialize("vv") Activity.AddView(vv, 0, 0, 500, 500) vv.LoadVideo("http","http://192.168.1.92/mjpg/1/video.mjpg") Msgbox("Loading and buffering video","Loading") ToastMessageShow("loading streaming video....", True) vv.Play but the error is "Sorry, this video cannot be played" (in the manifest editor there is android.permission.INTERNET). I do not know what to do:sign0163: please tell me if there another chance. thanks Upvote 0
Thank you Erel, but I have tested it from My Samsung Tab2 but the problem is the same. Probably webview is not the correct way? I tried also with LOADVIDEO Code: vv.Initialize("vv") Activity.AddView(vv, 0, 0, 500, 500) vv.LoadVideo("http","http://192.168.1.92/mjpg/1/video.mjpg") Msgbox("Loading and buffering video","Loading") ToastMessageShow("loading streaming video....", True) vv.Play but the error is "Sorry, this video cannot be played" (in the manifest editor there is android.permission.INTERNET). I do not know what to do:sign0163: please tell me if there another chance. thanks
Erel B4X founder Staff member Licensed User Longtime User May 3, 2013 #4 The problem is that Android doesn't support it. It is possible to turn this code into a library: Android ICS and MJPEG using AsyncTask - Stack Overflow Upvote 0
The problem is that Android doesn't support it. It is possible to turn this code into a library: Android ICS and MJPEG using AsyncTask - Stack Overflow