|
|
|
@ -21,6 +21,7 @@ import 'editor.dart'; |
|
|
|
|
import 'text_block.dart'; |
|
|
|
|
import 'text_line.dart'; |
|
|
|
|
import 'video_app.dart'; |
|
|
|
|
import 'youtube_video_app.dart'; |
|
|
|
|
|
|
|
|
|
class QuillSimpleViewer extends StatefulWidget { |
|
|
|
|
const QuillSimpleViewer({ |
|
|
|
@ -113,6 +114,10 @@ class _QuillSimpleViewerState extends State<QuillSimpleViewer> |
|
|
|
|
: Image.file(io.File(imageUrl)); |
|
|
|
|
case 'video': |
|
|
|
|
final videoUrl = node.value.data; |
|
|
|
|
if (videoUrl.contains('youtube.com') || videoUrl.contains('youtu.be')) { |
|
|
|
|
return YoutubeVideoApp( |
|
|
|
|
videoUrl: videoUrl, context: context, readOnly: readOnly); |
|
|
|
|
} |
|
|
|
|
return VideoApp( |
|
|
|
|
videoUrl: videoUrl, context: context, readOnly: readOnly); |
|
|
|
|
default: |
|
|
|
|