File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,12 @@ class TagVideo {
2828 onChild: onChild,
2929 onWidgets: onWidgets,
3030 );
31+
32+ final attrs = videoMeta.element.attributes;
33+ final url = wf.urlFull (attrs[kAttributeVideoSrc] ?? '' );
34+ if (url != null ) {
35+ _sourceUrls.add (url);
36+ }
3137 }
3238
3339 void onChild (BuildMetadata childMeta) {
Original file line number Diff line number Diff line change @@ -10,7 +10,13 @@ void main() {
1010
1111 mockVideoPlayerPlatform ();
1212
13- testWidgets ('renders video player' , (tester) async {
13+ testWidgets ('renders video player with src attribute' , (tester) async {
14+ const html = '<video src="$src "></video>' ;
15+ final e = await explain (tester, html);
16+ expect (e, equals ('[VideoPlayer:url=$src ,aspectRatio=$defaultAspectRatio ]' ));
17+ });
18+
19+ testWidgets ('renders video player with SOURCE child tag' , (tester) async {
1420 const html = '<video><source src="$src "></video>' ;
1521 final e = await explain (tester, html);
1622 expect (e, equals ('[VideoPlayer:url=$src ,aspectRatio=$defaultAspectRatio ]' ));
You can’t perform that action at this time.
0 commit comments