Skip to content

Commit

Permalink
Opsiee
Browse files Browse the repository at this point in the history
  • Loading branch information
Mercurial committed Jul 12, 2020
1 parent 2646ca1 commit 9dfe45e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion BlazorMedia/BlazorMedia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<LangVersion>8.0</LangVersion>
<RazorLangVersion>3.0</RazorLangVersion>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<Version>0.3.0.8</Version>
<Version>0.3.0.9</Version>
<Authors>Rory Clark Manuelle Alesna, Nestor Angelo Tan</Authors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
Expand Down
2 changes: 1 addition & 1 deletion BlazorMedia/tsconfig.tsbuildinfo
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"affectsGlobalScope": true
},
"./wwwroot/blazormedia.ts": {
"version": "7c3daa7058d7d82aae8a4e22750fd97b53e6e1a74a6ba83ca81eb9ba1d739266",
"version": "d667c85e81a2d6dc88bad6dbdd27f6af5377095cde79d6b1098f1e2f9c7fb712",
"signature": "b747948aaca5cafe9c2ae5fa00d7494c572247acfbe2ac066300c7cc9123bef9",
"affectsGlobalScope": true
},
Expand Down
20 changes: 11 additions & 9 deletions BlazorMedia/wwwroot/BlazorMedia.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,17 @@ var BlazorMedia;
BlazorMediaInterop.AddBlazorFPSListener = function (videoElement, componentRef) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
videoElement.lastFPS = 0;
// FPS Counter
videoElement.fpsIntervalId = setInterval(function () {
if (videoElement) {
var frameRate = videoElement.getVideoPlaybackQuality().totalVideoFrames - videoElement.lastFPS;
videoElement.lastFPS = videoElement.getVideoPlaybackQuality().totalVideoFrames;
componentRef.invokeMethodAsync("ReceiveFPS", frameRate);
}
}, 1000);
if (videoElement) {
videoElement.lastFPS = 0;
// FPS Counter
videoElement.fpsIntervalId = setInterval(function () {
if (videoElement) {
var frameRate = videoElement.getVideoPlaybackQuality().totalVideoFrames - videoElement.lastFPS;
videoElement.lastFPS = videoElement.getVideoPlaybackQuality().totalVideoFrames;
componentRef.invokeMethodAsync("ReceiveFPS", frameRate);
}
}, 1000);
}
return [2 /*return*/];
});
});
Expand Down

0 comments on commit 9dfe45e

Please sign in to comment.