Closed techcalibrator closed 5 years ago
VideoInfo videoInfo = new VideoInfo(Uri.parse(swiftUrl)) .setTitle(channelsList.get(result).getChannelName())//config title .setAspectRatio(VideoInfo.AR_MATCH_PARENT) .addOption(Option.create(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "user_agent", "")) .addOption(Option.create(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "referer", "")); videoView.videoInfo(videoInfo).getPlayer().start();
.addOption(Option.create(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "headers", "referer: xxx\r\nuser-agent: okhttp\r\n"))
Thanks @tcking
VideoInfo videoInfo = new VideoInfo(Uri.parse(swiftUrl)) .setTitle(channelsList.get(result).getChannelName())//config title .setAspectRatio(VideoInfo.AR_MATCH_PARENT) .addOption(Option.create(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "user_agent", "")) .addOption(Option.create(IjkMediaPlayer.OPT_CATEGORY_FORMAT, "referer", "")); videoView.videoInfo(videoInfo).getPlayer().start();