Skip to content

Commit

Permalink
Enhanced video player
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingWonders committed Mar 24, 2024
1 parent 68483f3 commit e8d467b
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 7 deletions.
22 changes: 21 additions & 1 deletion Help/HelpVideoPlayer.vb
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
Public Class HelpVideoPlayer

Private Sub HelpVideoPlayer_Load(sender As Object, e As EventArgs) Handles MyBase.Load

Select Case MainForm.Language
Case 0
Select Case My.Computer.Info.InstalledUICulture.ThreeLetterWindowsLanguageName
Case "ENU", "ENG"
Text = "DISMTools Video Player"
Case "ESN"
Text = "Reproductor de vídeo de DISMTools"
Case "FRA"
Text = "Lecteur vidéo DISMTools"
Case "PTB", "PTG"
Text = "Reprodutor de vídeo DISMTools"
End Select
Case 1
Text = "DISMTools Video Player"
Case 2
Text = "Reproductor de vídeo de DISMTools"
Case 3
Text = "Lecteur vidéo DISMTools"
Case 4
Text = "Reprodutor de vídeo DISMTools"
End Select
End Sub

Private Sub HelpVideoPlayer_VisibleChanged(sender As Object, e As EventArgs) Handles MyBase.VisibleChanged
Expand Down
Binary file modified Installer/Output/dt_setup.exe
Binary file not shown.
6 changes: 5 additions & 1 deletion MainForm.vb
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ Public Class MainForm
Using client As New WebClient()
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12
Try
client.DownloadFile("https://raw.githubusercontent.com/CodingWonders/DISMTools/" & dtBranch & "/Videos/videos.xml", Application.StartupPath & "\videos.xml")
client.DownloadFile("https://raw.githubusercontent.com/CodingWonders/dt_videos/main/videos.xml", Application.StartupPath & "\videos.xml")
Catch ex As Exception
Debug.WriteLine("Could not download video list")
End Try
Expand Down Expand Up @@ -17227,6 +17227,10 @@ Public Class MainForm
.Text = My.Computer.FileSystem.ReadAllText(Application.StartupPath & "\videos\videoplay_tmp.html")
}
vidPlayRTB.Text = vidPlayRTB.Text.Replace("{#REPLACEME}", ID).Trim().Replace("{#NAME}", Name).Trim().Replace("{#DESCRIPTION}", Description).Trim()
' Set appropriate color mode in light theme
If BackColor = Color.FromArgb(239, 239, 242) Then
vidPlayRTB.Text = vidPlayRTB.Text.Replace("<body class=" & Quote & "pagebody-dark" & Quote & ">", "<body class=" & Quote & "pagebody" & Quote & ">").Trim()
End If
File.WriteAllText(Application.StartupPath & "\videos\videoplay.html", vidPlayRTB.Text, UTF8)
HelpVideoPlayer.WebBrowser1.Navigate(Application.StartupPath & "\videos\videoplay.html")
' Check emulation mode settings of IE for DISMTools and set them to IE11 (+Edge) (if not detected)
Expand Down
10 changes: 5 additions & 5 deletions Videos/videoplay.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
text-align: center
}
.pagebody iframe {
width: 720px;
height: 420px
width: 80%;
height: 80%
}
.pagebody h2, p {
text-align: left;
Expand All @@ -24,8 +24,8 @@
text-align: center
}
.pagebody-dark iframe {
width: 720px;
height: 420px
width: 80%;
height: 80%
}
.pagebody-dark h2, p {
text-align: left;
Expand All @@ -34,7 +34,7 @@
</style>
</head>
<body class="pagebody-dark">
<iframe src="https://youtube.com/embed/{#REPLACEME}?autoplay=1&controls=0"></iframe>
<iframe src="https://youtube.com/embed/{#REPLACEME}?autoplay=1"></iframe>
<h2>{#NAME}</h2>
<p>{#DESCRIPTION}</p>
</body>
Expand Down

0 comments on commit e8d467b

Please sign in to comment.