Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8639239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:57:06+00:00 2026-06-12T10:57:06+00:00

I need to embed a player that can play video files and use subtitles

  • 0

I need to embed a player that can play video files and use subtitles (.srt).

Which players (with good documentation) are available for this task? And how do I set the file and subtitle to it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T10:57:08+00:00Added an answer on June 12, 2026 at 10:57 am

    Workaround

    Add a Windows Media Player COM object.

    Add a Timer

    private Timer playingTimer = new Timer();
    public Main()
    {
        InitializeComponent();
        
        playingTimer.Enabled = false;
        playingTimer.Tick += renderSubtitles;
    }
    

    Handle StatusChange to know when it starts to play

    private void Main_Load(object sender, EventArgs e)
    {
        player.StatusChange += player_StatusChange;
    }
    

    Activate timer when playing

    void player_StatusChange(object sender, EventArgs e)
    {
        if (player.playState == WMPLib.WMPPlayState.wmppsPlaying)
        {
            playingTimer.Enabled = true;
        }
        else
        {
            playingTimer.Enabled = false;
        }
    }
    

    Get current seconds from player.Ctlcontrols.currentPosition, if a subtitle is found make the label visible, set the text and center horizontally. If there aren’t any subtitles, hide the label.

    private void renderSubtitles(object sender, EventArgs e)
    {
        var ts = TimeSpan.FromSeconds(player.Ctlcontrols.currentPosition);
        var entry = entries.FirstOrDefault(o => o.Start <= ts && o.End >= ts);
    
        if (entry != null)
        {
            subtitle.Visible = true;
            subtitle.Text = entry.Text;
            
            var w = splitContainer.Panel1.Width;
            subtitle.Location = new Point(w / 2 - subtitle.Width / 2, subtitle.Location.Y);
        }
        else
        {
            subtitle.Visible = false;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to build a Video Player in android that can play youtube HTML5
I need an embeddable audio player that will play wav files in IE, FF,
Is it possible to embed my own video player in Facebook, so I can
I need to embed the Flash player in a native application (C++) in a
How can I use pure HTML to make a browser-integrated flash-free online music player?
i have a flash video called abc.swf that i would like to play when
I need to play youtube video in the webview,but when I load the URL
I would like to make a Flash video player that takes a URL as
I found a method to play YouTube video on MPMoviePlayerController. For this simply need
I am working on a video listing website which uses JW Player and its

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.