Player_Android icon indicating copy to clipboard operation
Player_Android copied to clipboard

Flutter 中引入报错

Open lczalh opened this issue 3 years ago • 4 comments

package package_name.read_shadow;

import android.content.Context; import android.graphics.Color; import android.view.View; import android.widget.TextView;

import com.tencent.liteav.demo.play.SuperPlayerModel; import com.tencent.liteav.demo.play.SuperPlayerView;

import io.flutter.plugin.common.BinaryMessenger; import io.flutter.plugin.platform.PlatformView;

public class CZVideoPlayerView implements PlatformView {

TextView textView;

SuperPlayerView superPlayerView;

CZVideoPlayerView(Context context, int viewId, Object args) {
    textView = new TextView(context);
    textView.setText("我是Android View");
    superPlayerView = new SuperPlayerView(context);
    superPlayerView.setBackgroundColor(Color.parseColor("#FFB6C1"));
    SuperPlayerModel model = new SuperPlayerModel();
    model.url = "http://200024424.vod.myqcloud.com/200024424_709ae516bdf811e6ad39991f76a4df69.f20.mp4";
    superPlayerView.playWithModel(model);
}

@Override
public View getView() {
    return superPlayerView;
}

@Override
public void dispose() {

}

}

/Users/liuchaozheng/Desktop/read_shadow/android/app/src/main/java/package_name/read_shadow/CZVideoPlayerView.java:24: 错误: 无法访问ITXVodPlayListener superPlayerView.setBackgroundColor(Color.parseColor("#FFB6C1")); ^ 找不到com.tencent.rtmp.ITXVodPlayListener的类文件 /Users/liuchaozheng/Desktop/read_shadow/android/app/src/main/java/package_name/read_shadow/CZVideoPlayerView.java:27: 错误: 无法访问ITXLivePlayListener superPlayerView.playWithModel(model); ^ 找不到com.tencent.rtmp.ITXLivePlayListener的类文件 2 个错误

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 11s Exception: Gradle task assembleDebug failed with exit code 1

lczalh avatar Oct 01 '20 15:10 lczalh

sdk不支持flutter接入

284419487 avatar Nov 02 '20 06:11 284419487

flutter 可以尝试使用 https://github.com/leanflutter/flutter_superplayer

lijy91 avatar May 11 '21 02:05 lijy91

@lijy91 你是如何处理腾讯云超级播放器在flutter中的全屏问题的?我目前视频全屏后,会导致整个页面发生旋转

lczalh avatar Jul 31 '21 09:07 lczalh

@lczalh 我现在尝试把把控制界面改到了用dart实现,具体可以看上面repo的example

lijy91 avatar Aug 04 '21 02:08 lijy91

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

lczalh avatar Apr 28 '23 03:04 lczalh