I am gradually writing a wrapper for the Vitamio-plugin. See my post here: http://www.b4x.com/forum/additional-libraries-classes-official-updates/19329-vitamiob4a-b4a-wrapper-vitamio-plugin-advanced-videoview-library.html
Most stuff works but I have a problem with setting the video-size. From the sources I am using (link for download: http://files.cnblogs.com/over140/2012/5/Vitamio-Demo2012-5-22.zip) and when compiling the project (make sure to use VideoViewDemo - you can comment out the other project), the resulting app works nicely and in particular change of video-size (double-tapping on screen).
In my own B4A sample-project (see my VitamioB4A post), I can get some results (in Panel long-click event) but it is only the view itself which changes size and not the playing video contrary to the sample-app generated from the sources I am using.
I believe it has something to with the surface_view. In the sources (and the app) which are working, there are two lines as follows:
I have not been able to implement above code (my knowledge of Java is very poor) and I believe said code might be the reason why the change of video-size does not work. Maybe it is not possible anyhow to use said code in B4A-wrappers since I believe the xml-layout is only created during compilation although I am not sure. If this is the case, what can I do overcome that problem?
Note: in the API, there is also also an event called "OnVideoSizeChangedListener" but it seems it is not used in the sources I am using so it is probably of no importance.
As mentioned, you can find my eclipse-sources in the other post. If some of you experts would like to take a look and see if there is something obvious which is missing or which I am doing wrong, I would really be grateful. If there is an error or something I have not implemented properly, you will probably find in the wrapper-source (Eclipse). However, maybe I am not using the wrapper correctly in the B4A-project. I am not 100% sure.
In a certain way, I am already pleased with the wrapper-library at is current state but still it would be a pity if I couldn't implement the change of video-size since it is actually working in the other sample-project mentioned above. It would also be another benefit of this library since the standard Android video-view does not support video-sizing (only original size).
Thanks.
Most stuff works but I have a problem with setting the video-size. From the sources I am using (link for download: http://files.cnblogs.com/over140/2012/5/Vitamio-Demo2012-5-22.zip) and when compiling the project (make sure to use VideoViewDemo - you can comment out the other project), the resulting app works nicely and in particular change of video-size (double-tapping on screen).
In my own B4A sample-project (see my VitamioB4A post), I can get some results (in Panel long-click event) but it is only the view itself which changes size and not the playing video contrary to the sample-app generated from the sources I am using.
I believe it has something to with the surface_view. In the sources (and the app) which are working, there are two lines as follows:
B4X:
setContentView(R.layout.videoview);
mVideoView = (VideoView) findViewById(R.id.surface_view);
//for my project, I had to change it into:
vitamioExt = (VideoView) findViewById(R.id.surface_view)
I have not been able to implement above code (my knowledge of Java is very poor) and I believe said code might be the reason why the change of video-size does not work. Maybe it is not possible anyhow to use said code in B4A-wrappers since I believe the xml-layout is only created during compilation although I am not sure. If this is the case, what can I do overcome that problem?
Note: in the API, there is also also an event called "OnVideoSizeChangedListener" but it seems it is not used in the sources I am using so it is probably of no importance.
As mentioned, you can find my eclipse-sources in the other post. If some of you experts would like to take a look and see if there is something obvious which is missing or which I am doing wrong, I would really be grateful. If there is an error or something I have not implemented properly, you will probably find in the wrapper-source (Eclipse). However, maybe I am not using the wrapper correctly in the B4A-project. I am not 100% sure.
In a certain way, I am already pleased with the wrapper-library at is current state but still it would be a pity if I couldn't implement the change of video-size since it is actually working in the other sample-project mentioned above. It would also be another benefit of this library since the standard Android video-view does not support video-sizing (only original size).
Thanks.