Videojs 在不使用任何插件的情况下显示自定义消息 [英] Videojs displaying a custom message without using any plugin

查看:25
本文介绍了Videojs 在不使用任何插件的情况下显示自定义消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试根据 videojs 中的特定条件显示错误消息.是否有任何可能的方式在不使用任何插件(例如 videojs-errors)的情况下显示消息?

I am trying to display an error message according to a specific condition in videojs.Is there any possible way of displaying a message without using any plugin like videojs-errors?

我尝试使用 player.error() 但这只会在控制台中打印错误,但我需要在播放器上使用它.

I have tried using player.error() but this only print an error in console but i need it on the player.

推荐答案

您可以使用 Video.js 的内置模态对话框:

You can use Video.js's inbuilt modal dialog:

player.createModal('Your message here!');

https://docs.videojs.com/tutorial-modal-dialog.html

这篇关于Videojs 在不使用任何插件的情况下显示自定义消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆