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 615307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:12:22+00:00 2026-05-13T18:12:22+00:00

i have used embed tag for Flv file, Flash Player for swf file and

  • 0

i have used “embed” tag for Flv file, Flash Player for “swf” file and “object tag for other files…
everything working fine with IE but in Mozilla only swf files working properly..
can anybody suggest me right way to play video of any type in IE and Mozilla both

  • 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-05-13T18:12:22+00:00Added an answer on May 13, 2026 at 6:12 pm

    i did it using ffmpeg… finally
    i converted file nto .flv then created its thumbnail and played video using “embed” tag which works fine in IE and mozila both

    here is my wcfservice file code

    Interface file

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Runtime.Serialization;
    using System.ServiceModel;
    using System.Text;
    
    namespace WcfFileUploader
    {
        // NOTE: If you change the interface name "IFileUploader" here, you must also update the reference to "IFileUploader" in Web.config.
        [ServiceContract]
    
        public interface IFileUploader
        {
            [OperationContract(Action = "UploadFile", IsOneWay = true)]
    
            void UploadFile(FileUploadMessage request);
        }
        [MessageContract]
        public class FileUploadMessage
        {
            //[MessageHeader(MustUnderstand = true)]
            //public DataContracts.DnvsDnvxSession DnvxSession;
    
            //[MessageHeader(MustUnderstand = true)]
            //public DataContracts.EApprovalContext Context;
    
            [MessageHeader(MustUnderstand = true)]
            public string FileName;
    
            [MessageHeader(MustUnderstand = true)]
            public string ThumbnailName;
    
            [MessageHeader(MustUnderstand = true)]
            public string ffmpegPath;
    
            [MessageBodyMember(Order = 1)]
            public System.IO.Stream FileByteStream;
        }
    }
    

    Service.cs

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Runtime.Serialization;
    using System.ServiceModel;
    using System.Text;
    using System.IO;
    using System.Web;
    using System.ServiceModel.Activation;
    using System.Diagnostics;
    namespace WcfFileUploader
    {
        // NOTE: If you change the class name "FileUploader" here, you must also update the reference to "FileUploader" in Web.config.
        //[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    
        public class FileUploader : IFileUploader
        {
            //public FileUploader()
            //{
            //    HttpContext httpContext = HttpContext.Current;
    
            //    if (httpContext != null)
            //    {
            //        httpContext.Response.BufferOutput = false;
            //    }
    
    
            //}
            public void UploadFile(FileUploadMessage request)
            {
                try
                {
                    FileStream targetStream = null;
                    Stream sourceStream = request.FileByteStream;
    
                    //string uploadFolder = @"C:\TEMP\";
                    //string filename = request.FileName;
                    string filePath = request.FileName;//Path.Combine(uploadFolder, filename);
    
                    using (targetStream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.None))
                    {
                        //read from the input stream in 4K chunks
                        //and save to output stream
                        const int bufferLen = 4096;
                        byte[] buffer = new byte[bufferLen];
                        int count = 0;
                        while ((count = sourceStream.Read(buffer, 0, bufferLen)) > 0)
                        {
                            targetStream.Write(buffer, 0, count);
                        }
                        targetStream.Close();
                        sourceStream.Close();
                    }
                    string outputfilename = ConvertToFlash(request.FileName, request.ffmpegPath);
                    CreateThumbnail(outputfilename, request.ffmpegPath, request.ThumbnailName);
    
                }
                catch (Exception ex)
                {
    
                }
            }
            private string ConvertToFlash(string inputfile, string ffmpegPath)
            {
                string outputfile, filargs;
                outputfile = inputfile.Replace(Path.GetExtension(inputfile).ToString(), ".flv");
                filargs = "-i \"" + inputfile + "\" -ar 22050 \"" + outputfile + "\"";
                Process proc;
                proc = new Process();
                proc.StartInfo.FileName = ffmpegPath;
                proc.StartInfo.Arguments = filargs;
                proc.StartInfo.UseShellExecute = false;
                proc.StartInfo.CreateNoWindow = false;
                proc.StartInfo.RedirectStandardOutput = true;
    
                try
                {
                    proc.Start();
                }
                catch (Exception)
                {
    
                }
    
                proc.WaitForExit();
                proc.Close();
    
    
    
                File.Delete(inputfile);
                return outputfile;
            }
            private void CreateThumbnail(string outputfile, string ffmpegPath, string ThumbnailPath)
            {
                string thumbargs;
                thumbargs = "-i \"" + outputfile + "\" -vcodec png -vframes 1 -an -f rawvideo -s 320×240 \"" + ThumbnailPath + "\"";
                Process thumbproc = new Process();
                thumbproc = new Process();
                thumbproc.StartInfo.FileName = ffmpegPath;
                thumbproc.StartInfo.Arguments = thumbargs;
                thumbproc.StartInfo.UseShellExecute = false;
                thumbproc.StartInfo.CreateNoWindow = false;
                thumbproc.StartInfo.RedirectStandardOutput = true;
                try
                {
                    thumbproc.Start();
                }
                catch (Exception)
                {
    
                }
    
                thumbproc.WaitForExit();
                thumbproc.Close();
    
            }
        }
    }
    

    this code uploads file converts it into .flv and creates thumbnail for the same

    here is web.config for this Service

    <?xml version="1.0"?>
    <!--
        Note: As an alternative to hand editing this file you can use the 
        web admin tool to configure settings for your application. Use
        the Website->Asp.Net Configuration option in Visual Studio.
        A full list of settings and comments can be found in 
        machine.config.comments usually located in 
        \Windows\Microsoft.Net\Framework\v2.x\Config 
    -->
    <configuration>
        <configSections>
            <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                        <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                        <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                        <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                        <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    </sectionGroup>
                </sectionGroup>
            </sectionGroup>
        </configSections>
        <appSettings/>
        <connectionStrings/>
        <system.web>
        <httpRuntime    maxRequestLength="65536"/>
    
        <!--
                Set compilation debug="true" to insert debugging 
                symbols into the compiled page. Because this 
                affects performance, set this value to true only 
                during development.
            -->
            <compilation debug="true">
                <assemblies>
                    <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                </assemblies>
            </compilation>
            <!--
                The <authentication> section enables configuration 
                of the security authentication mode used by 
                ASP.NET to identify an incoming user. 
            -->
            <authentication mode="Windows"/>
            <!--
                The <customErrors> section enables configuration 
                of what to do if/when an unhandled error occurs 
                during the execution of a request. Specifically, 
                it enables developers to configure html error pages 
                to be displayed in place of a error stack trace.
    
            <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
                <error statusCode="403" redirect="NoAccess.htm" />
                <error statusCode="404" redirect="FileNotFound.htm" />
            </customErrors>
            -->
            <pages>
                <controls>
                    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                </controls>
            </pages>
            <httpHandlers>
                <remove verb="*" path="*.asmx"/>
                <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
            </httpHandlers>
            <httpModules>
                <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </httpModules>
        </system.web>
        <system.codedom>
            <compilers>
                <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
                    <providerOption name="CompilerVersion" value="v3.5"/>
                    <providerOption name="WarnAsError" value="false"/>
                </compiler>
            </compilers>
        </system.codedom>
        <!--
            The system.webServer section is required for running ASP.NET AJAX under Internet
            Information Services 7.0.  It is not necessary for previous version of IIS.
        -->
        <system.webServer>
            <validation validateIntegratedModeConfiguration="false"/>
            <modules>
                <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </modules>
            <handlers>
                <remove name="WebServiceHandlerFactory-Integrated"/>
                <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            </handlers>
        </system.webServer>
        <system.serviceModel>
            <bindings>
                <basicHttpBinding>
                    <!-- buffer: 64KB; max size: 64MB -->
                    <binding name="FileTransferServicesBinding" closeTimeout="00:01:00" openTimeout="00:01:00" 
                     receiveTimeout="00:10:00" sendTimeout="00:01:00" transferMode="Streamed" messageEncoding="Mtom"
                     maxBufferSize="65536" maxReceivedMessageSize="67108864">
                        <security mode="None">
                            <transport clientCredentialType="None"/>
                        </security>
                    </binding>
                </basicHttpBinding>
            </bindings>
            <services>
                <service behaviorConfiguration="WcfFileUploader.FileUploaderBehavior" name="WcfFileUploader.FileUploader">
                    <endpoint address="" binding="basicHttpBinding" contract="WcfFileUploader.IFileUploader" bindingConfiguration="FileTransferServicesBinding">
                        <identity>
                            <dns value="localhost"/>
                        </identity>
                    </endpoint>
                    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
                </service>
            </services>
            <behaviors>
                <serviceBehaviors>
                    <behavior name="WcfFileUploader.FileUploaderBehavior">
                        <serviceMetadata httpGetEnabled="true"/>
                        <serviceDebug includeExceptionDetailInFaults="false"/>
                    </behavior>
                </serviceBehaviors>
            </behaviors>
        </system.serviceModel>
    </configuration>
    

    web.config… service end point in website

     <system.serviceModel>
        <bindings>
    
          <basicHttpBinding>
            <!-- buffer: 64KB; max size: 64MB -->
            <binding name="FileTransferServicesBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transferMode="Streamed" messageEncoding="Mtom" maxBufferSize="65536" maxReceivedMessageSize="67108864">
              <security mode="None">
                <transport clientCredentialType="None"/>
              </security>
            </binding>
          </basicHttpBinding>
     </bindings>
    
        <client>
          <endpoint address="http://servername/WcfFileUploader/FileUploader.svc" binding="basicHttpBinding" bindingConfiguration="FileTransferServicesBinding" contract="IFileUploader" name="BasicHttpBinding_IFileUploader"/>
     </client>
      </system.serviceModel>
      <system.web>
        <httpRuntime maxRequestLength="65536"/>
     </system.web>
    

    Embed tag used to play video…

    <embed src="player.swf" height="425px" width="425px" allowscriptaccess="always" allowfullscreen="true" flashvars="file=../Videos/b28f9741-6dd5-4584-b2b9-cb6626e4aa33.flv" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SWF file and I am trying to embed it into an
I have a .h file which is used almost throughout the source code (in
I have a XML file with data that is used in both my C#
I used to embed YouTube video's via a link I have in a database.
I have a case where I need to serve raw swf files to the
I have used git update-index --assume-unchanged on some files to keep my changes to
I have used traditional version control systems to maintain source code repositories on past
I have used IPC in Win32 code a while ago - critical sections, events,
I have used the XML Parser before, and even though it worked OK, I
I have used Photoshop CS2's Save for Web feature to create a table of

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.