Comments (2)
Option ijkapplication not found. 不是错误,可以配置下文档的 tcp 看看
from gsyvideoplayer.
Option ijkapplication not found. 不是错误,可以配置下文档的 tcp 看看
哇, 可以 了, 现在能播了, 谢谢作者
这是我的 mainActivity代码
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Surface
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.viewinterop.AndroidView
import com.example.myapplication.ui.theme.MyApplicationTheme
import com.shuyu.gsyvideoplayer.GSYVideoManager
import com.shuyu.gsyvideoplayer.model.VideoOptionModel
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer
import tv.danmaku.ijk.media.player.IjkMediaPlayer
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
MyApplicationTheme {
// A surface container using the 'background' color from the theme
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {
GSYVideoPlayerView(
Modifier.fillMaxSize(),
"rtsp://admin:[email protected]:554/Streaming/Channels/101"
)
}
}
}
}
}
@Composable
fun GSYVideoPlayerView(modifier: Modifier = Modifier, videoUrl: String) {
AndroidView(
modifier = modifier,
factory = { context ->
val videoOptionModel =
VideoOptionModel(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtsp_transport", "tcp")
val list: MutableList<VideoOptionModel> = ArrayList()
list.add(videoOptionModel)
GSYVideoManager.instance().optionModelList = list;
StandardGSYVideoPlayer(context).apply {
setUp(videoUrl, true, "测试视频")
startPlayLogic()
}
},
update = { player ->
player.setUp(videoUrl, true, "测试视频")
player.startPlayLogic()
}
)
}
是加了这几行 就可以 了
val videoOptionModel =
VideoOptionModel(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "rtsp_transport", "tcp")
val list: MutableList<VideoOptionModel> = ArrayList()
list.add(videoOptionModel)
GSYVideoManager.instance().optionModelList = list;
参考文档是这个 https://github.com/CarGuo/GSYVideoPlayer/blob/master/doc/QUESTION.md 第17 条
from gsyvideoplayer.
Related Issues (20)
- 8.5.0版本,拉取rtsp流无声音 HOT 1
- GSYVideoPlayer-exo_player2:8.5.0-release-jitpack无法通过jitpack下载 HOT 1
- 有计划搞一个腾讯云支持的demo吗? HOT 1
- 大佬,咨询一下,这个库有没有根据RTMP视频流的分辨率来切换渲染比例的? HOT 3
- 在banner里面使用StandardGSYVideoPlayer播放出现有声音,但是画面不变的情况 HOT 1
- EXO或者IJK内核播放时会断流 HOT 8
- 能否再阿里云仓库升级下,目前阿里云仓库8.1.2 HOT 1
- 视频播放回到完成错误 HOT 1
- 我用的最新的demo导入 配置好后能运行 但是用gradle命令运行会报错? HOT 3
- 常见问题的issues2347的地址打不开了 HOT 1
- 进度条拖动异常 HOT 3
- RawDataSourceProvider 这里读取大文件会不会 OOM? HOT 1
- 关于调用seekTo实现视频倒放的效果 HOT 2
- 锁定屏幕后右滑或者虚拟返回键都禁止可以吗?现在我锁定以后右滑还是可以返回出来
- 全屏的时候锁定屏幕后,禁止右滑返回和虚拟键返回吗 HOT 1
- 全屏的时候锁定屏幕后,禁止右滑返回和虚拟键返回吗?就是在全屏的时候点击了锁定屏幕,右滑返回的时候应该不能退出全屏 HOT 2
- 右滑或者虚拟机返回的时候应该不退出全屏,你应该在 Activity 层做 HOT 2
- 亮度调节dialog全屏显示不全 HOT 3
- 请问能获取到退出全屏的回调吗 HOT 1
- 更新SDK后,华为报病毒 HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gsyvideoplayer.