El reproductor de video de Android admite formatos mp4, m3u8, 3gp y más.
Implementación
implementación 'net.webilisim.webplayer:webplayer:1.0.11'
Configura el reproductor en tu XML
<LinearLayoutandroid:layout_width="match_parent"android:layout_height="200dp"> <net.webilisim.webplayer.WEBPlayerStdandroid:id="@+id/webplayer"android:layout_width="match_parent"android:layout_height="200dp" /> </Diseño lineal>
Configurar vídeo en reproductor web
WEBPlayerStd webPlayerStd = findViewById(R.id.webplayer);webPlayerStd.setUp("URL DE SU VIDEO", "TÍTULO DE SU VIDEO"); webPlayerStd.thumbImageView.setImage("IMAGEN MINIMA DE SU VIDEO");
Algunas herramientas de actividad
@Overridepublic void onBackPressed() {if (WEBPlayer.backPress()) {retorno; }super.onBackPressed(); }@Overrideprotected void onPause() {super.onPause();WEBPlayer.releaseAllVideos(); }
Configuración de manifiesto
<activity android:name=".MainActivity" android:configChanges="orientation|screenSize|keyboardHidden" android:screenOrientation="portrait" /> <!-- or android:screenOrientation="landscape"-->
6. configuración de proguard-rules.pro
-keep public class net.webilisim.webplayer.WEBPlayerMediaSystem {*; }
Copyright [2020] [We Bilişim Interactive]
Por el presente se otorga permiso, sin cargo, a cualquier persona que obtenga una copia de este software y los archivos de documentación asociados (el "Software"), para operar con el Software sin restricciones, incluidos, entre otros, los derechos de uso, copia, modificación, fusión. , publicar, distribuir, sublicenciar y/o vender copias del Software, y permitir que las personas a quienes se les proporciona el Software lo hagan, sujeto a las siguientes condiciones:
El aviso de derechos de autor anterior y este aviso de permiso se incluirán en todas las copias o partes sustanciales del Software.
EL SOFTWARE SE PROPORCIONA "TAL CUAL", SIN GARANTÍA DE NINGÚN TIPO, EXPRESA O IMPLÍCITA, INCLUYENDO PERO NO LIMITADO A LAS GARANTÍAS DE COMERCIABILIDAD, IDONEIDAD PARA UN PROPÓSITO PARTICULAR Y NO INFRACCIÓN. EN NINGÚN CASO LOS AUTORES O TITULARES DE DERECHOS DE AUTOR SERÁN RESPONSABLES DE NINGÚN RECLAMO, DAÑO U OTRA RESPONSABILIDAD, YA SEA EN UNA ACCIÓN CONTRACTUAL, AGRAVIO O DE OTRA MANERA, QUE SURJA DE, FUERA DE O EN RELACIÓN CON EL SOFTWARE O EL USO U OTRAS NEGOCIOS EN EL SOFTWARE.