Modifying data retrieved from editorView.getXBlockFieldData()

Hi Open edX community,

I’m trying to modify the video xblock (I know it is not recommended but bear with me). I’ve been playing with the following lines in edit_xblock.js specifically line 171-185.

            save: function(event) {
                var self = this,
                    editorView = this.editorView,
                    xblockInfo = this.xblockInfo,
                    data = editorView.getXBlockFieldData();
                event.preventDefault();
                if (data) {
                    ViewUtils.runOperationShowingMessage(gettext('Saving'),
                        function() {
                            return xblockInfo.save(data);
                        }).done(function() {
                            self.onSave();
                        });
                }
            },

The data retrieved from editorView.getXblockFieldData() when updating the video url field with a youtube video contains something like the following:

data: undefined
metadata: {
  youtube_id_1_0: //youtubeID
}

if the video is not a youtube video and instead a video from a s3 bucket

data: undefined
metadata: {
  html5_source: [//s3VideoUrl]
}

I’ve tried to programmatically change the video url field in the video xblock when clicking ‘Save’ on the editor by hardcoding a video url from S3 and trying to assign it to the data object while removing the youtube_id_1_0 property

            save: function(event) {
                var self = this,
                    editorView = this.editorView,
                    xblockInfo = this.xblockInfo,
                    data = editorView.getXBlockFieldData();
                event.preventDefault();
                if (data) {
                    //Added 3 new lines below
                    delete data.metadata.youtube_id_1_0; //remove the property
                    data.metadata.html5_source = new Array; //add new property with an empty array
                    data.metadata.html5_source.push(videoUrlFromS3);
                    ViewUtils.runOperationShowingMessage(gettext('Saving'),
                        function() {
                            return xblockInfo.save(data);
                        }).done(function() {
                            self.onSave();
                        });
                }
            },

After making the changes, I made sure to recompile the assets. However when I’m going through the debugger and checking the values, or even the end result to test the changes, I’m unable to remove the youtube_id_1_0 property nor add the html5_source to the data object even.

Am I doing something wrong or did I overlook something? Are the values unchangeable? Sorry for the long post!

Further info: Using tutor to develop, Mac OS, open-release/koa.1