Tag: stream

Exporting Microsoft Stream Transcript

Microsoft has changed the interface on Stream slightly, so my code to export the transcript needed an update:

var objTranscriptLines = window.angular.element(window.document.querySelectorAll('.transcript-list')).scope().$ctrl.transcriptLines.map((t) => { return t.eventData.text; });
var strRunningText = "";
for(var i = 0; i < objTranscriptLines.length; i++){
    if( objTranscriptLines[i] ){
        var strLineText = objTranscriptLines[i];
        strRunningText = strRunningText + "\n" + strLineText;

Exporting Microsoft Stream Transcript — Prettier Output and Error Handling

Updated script available at https://www.rushworth.us/lisa/?p=6854

I had posted a one-liner to grab the text content of the Microsoft Stream transcript — there’s a good bit of cleanup required to make something professional looking, but I’ve been lazy about it & leave formatting up to the recipient. The one-liner approach fails when it doesn’t encounter a text element where it expects to find one. A more robust export approach creates a Node List containing all of the transcript-line classed elements, then iterates through that list and when the node has a textContent attribute appends that content to a running string value. Printing the running string value produces output that needs minimal reformatting.


var objTranscriptLines = window.document.querySelectorAll('.transcript-line');
var strRunningText = null;
for(var i = 0; i < objTranscriptLines.length; i++){
    if( objTranscriptLines[i].textContent ){
        var strLineText = objTranscriptLines[i].textContent;
        strRunningText = strRunningText + "\n" + strLineText.replace("Discard   Save","");


You *could* strip off the timestamps as well — instead of strLineText.replace(“Discard Save”,””) use (strLineText.replace(“Discard    Save”,””)).substr(8)