View Single Post
  #6  
Old 04-01-2020, 17:18
yologuy yologuy is offline
Friend
 
Join Date: Nov 2016
Posts: 18
Rept. Given: 0
Rept. Rcvd 0 Times in 0 Posts
Thanks Given: 5
Thanks Rcvd at 23 Times in 9 Posts
yologuy Reputation: 0
Ok seems to be an nodejs things built on top of ionic/angular and Cordova(for cross-platform?).

The source code is located in build/www/main.js
The var TutorialPage class is interesting stuff.

Video seems to be embedded in a vg_Player(with a crossorigin) as expect, read mp4 file.
Code:
<video [vgMedia]="media" [vgDash]="source" [vgHls]="source" #media id="singleVideo" preload="auto" type="video/mp4" crossorigin playsinline>\n </video>\n </vg-player
And the play prototype is pretty explanatory
TutorialPage.prototype.play
Which download the source, and sign/unsign it
Code:
    TutorialPage.prototype.play = function (video, autoplay, setCursor, customCursor) {
        var _this = this;
        this.source = '';
        this.isBuffering = true;
        this.disableControl = false;
        ((video.download.status == __WEBPACK_IMPORTED_MODULE_4__providers_download_status__["a" /* DownloadStatus */].STATUS_DOWNLOADED)
            ? video.download
                .getPath(true)
                .mergeMap(function (directory) {
                var basePath = directory.basePath, filePath = directory.filePath;
                return _this._signerService.isSigned(basePath + '/' + filePath.substr(1))
                    .mergeMap(function (isSigned) { return isSigned ? _this._signerService.unsign(basePath + '/' + filePath.substr(1)) : __WEBPACK_IMPORTED_MODULE_13_rxjs_Observable__["Observable"].of(''); })
                    .map(function () { return directory; });
            })
                .do(function (directory) {
                var basePath = directory.basePath, filePath = directory.filePath;
                var source = basePath + '/' + filePath.substr(1);
                if (_this.device.platform === 'iOS') {
                    source = Object(__WEBPACK_IMPORTED_MODULE_2_ionic_angular__["I" /* normalizeURL */])(source);
                }
                _this._setSource(source, autoplay, video, setCursor, customCursor);
            })
                .do(function (directory) {
                var basePath = directory.basePath, filePath = directory.filePath;
                __WEBPACK_IMPORTED_MODULE_13_rxjs_Observable__["Observable"].timer(1000)
                    .mergeMap(function () { return _this._signerService.sign(basePath + '/' + filePath.substr(1), video.id); })
                    .subscribe(function () { return null; });
            })
            : this._videoService
                .get(video.id)
                .do(function (data) { return _this._setSource(data.link, autoplay, video, setCursor, customCursor); }))
            .subscribe(function () {
            _this.api.getDefaultMedia().loadMedia();
            video.stats.lastTime = video.stats.cursor;
            if (_this._completionSubscriber) {
                _this._completionSubscriber.unsubscribe();
            }
            if (_this._playSubscriber) {
                _this._playSubscriber.unsubscribe();
            }
            setTimeout(function () {
                _this.onStartup = true;
                _this._completionSubscriber = _this.api.getDefaultMedia().subscriptions.timeUpdate.subscribe(function () { return _this._updateStats(video); });
                _this._playSubscriber = _this.api.getDefaultMedia().subscriptions.play.subscribe(function () { return _this._onPlay(video); });
            }, 400);
        });
    };
But the sign module is a C++ module compiled in Tuto.com\node_modules\signer\build\Release\signer.node which is a C++ extension so will try to give a shot tonight to decompile it
At least there is the sln file (without the .cc that would have been too nice) but the PDB is still there so it should be pretty trivial.

Thanks for the support guys

Last edited by yologuy; 04-01-2020 at 17:33.
Reply With Quote
The Following 2 Users Say Thank You to yologuy For This Useful Post:
niculaita (04-03-2020), ziapcland (04-13-2020)