Using the youtube_player_iframe library I was able to capture some video status data (playing, paused, with/without audio) for xAPI statemetns, but from external buttons, not from the player itself.
Video player -
Widget oneVideo(BuildContext context, double heigth, double width) {
-
return SingleChildScrollView(
-
child: Column(
-
children: [
-
SizedBox(
-
height: heigth,
-
width: width,
-
child: YoutubePlayer(
-
controller: _controller,
-
backgroundColor: Colors.black,
-
),
-
),
-
],
-
));
-
}
-
My custom buttons -
Row optionButtons(BuildContext context) {
-
return Row(
-
children: [
-
YoutubeValueBuilder(
-
builder: (context, value) {
-
return IconButton(
-
icon: Icon(
-
value.playerState == PlayerState.playing
-
? Icons.pause
-
: Icons.play_arrow,
-
),
-
onPressed: () {
-
if (value.playerState == PlayerState.playing) {
-
context.ytController.pauseVideo();
-
pausePlay(
-
"Pause", "WatchTemplateVideo", context.ytController);
-
} else {
-
context.ytController.playVideo();
-
pausePlay("Play", "WatchTemplateVideo", context.ytController);
-
}
-
},
-
);
-
},
-
)
-
],
-
);
-
}
-
The clasws builder -
Widget build(BuildContext context) {
-
double heigth = MediaQuery.of(context).size.height * 0.7;
-
double width = MediaQuery.of(context).size.width * 0.7;
-
return YoutubePlayerScaffold(
-
controller: _controller,
-
builder: (context, player) {
-
return YoutubePlayerControllerProvider(
-
controller: _controller,
-
child: Column(
-
children: [
-
oneVideo(context, heigth, width),
-
optionButtons(context)
-
],
-
),
-
);
-
});
-
}
-
However I have not been able to get it to capture the data from the internal controls of the player. I would be very grateful for your help :" )
0 4956 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Paolo Losi |
last post by:
Hi all,
I'm pretty new to the python language so please excuse me
if this is FAQ... I'm very glad to be part of the list! :-)
I'm looking into a way to implement a generic workflow framework...
|
by: Dave |
last post by:
Hello all,
I have recently completed work on a generic implementation of a state space
search library (standard C++ only). I have also written a toy client
application - the classic 8 puzzle -...
|
by: DoomedLung |
last post by:
I have been developing an image gallery which needed to be dynamic as
possible.
so I have placed the gallery in a div plus a div containing the large
image to be displayed. It works by changing...
|
by: DoomedLung |
last post by:
I have been developing an image gallery which needed to be dynamic as
possible.
so I have placed the gallery in a div plus a div containing the large
image to be displayed. It works by changing...
|
by: Yama |
last post by:
Hi,
I am trying to create a solution that will keep track of the changes
occurring in:
BeginInvoke, Invoke, and EndEnvoke of a delegate/event
I could associate then to it a OnChangingState...
|
by: Greg |
last post by:
I am building an SVG interface (with Javascript) for client side control
of some hardware. The svg will be hosted on a micro PC
(http://www.picotux.com/indexe.html). It runs a uClinux OS with GCC...
|
by: sri2097 |
last post by:
Basically,
I want to check if a URL is playable or not (without actually playing
it).
i.e. given a URL I want to write an automation script to figure it out
for me
if it's playable or not. If...
|
by: Jim Langston |
last post by:
I had asked this in comp.lang.c++ with out any answers that would actually
work, so I'm hoping someone here may know a way.
I am calling C library functions that want to output to stdout. I need...
|
by: laktofil |
last post by:
This may seem like an abstract question on behavioral inheritance. Anyway, I'm building a hierarchical state machine in C++ (with gcc for target platform Gentoo Linux). More precisely, I'm using this...
|
by: smartic |
last post by:
I have two problems with YouTube embedded code:
<object id="selected-box_11027" width="460" height="330"...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |