Update segment by overview
jason30704 opened this issue ยท 7 comments
Thanks for reporting this, I'll look into it. Originally, segments could be dragged in the zoomview only, and the overview waveform was just to give a visualisation of the complete duration, but with only minimal interaction (seek).
Thanks you!
If I may, I have another question. I would like to ask how to draw a square segment similar to the picture below.
I've seen it in other issues. You previously provided an example of drawing a square area segment in the view, but I can't seem to see it now.
I have tried to modify CustomSegmentMarker, but I don't know how to dynamically obtain the width between startMarker and endMarker. Or is there any example that I can refer to?
1.mp4
You can use the segmentOptions
(documentation) to control how the segment is drawn. The CustomSegmentMarker
only implements the start/end markers, not the region between them.
Try using these options:
segmentOptions: {
overlayColor: '#ff0000',
overlayOpacity: 0.3,
overlayBorderColor: '#ff0000',
overlayBorderWidth: 2,
overlayCornerRadius: 5
}
background-color isn't a valid option - see the Configuration section in the API documentation for the available options.
Thanks a lot!
I tried adding " overlay: true ", and it worked.
I'd like to keep this open, because of the original issue you reported. Those errors can be avoided by not creating custom segment markers in the overview waveform, but it needs fixing properly.